top | item 8828432

(no title)

taybin | 11 years ago

Isn't it more lines of code now?

discuss

order

bacongobbler|11 years ago

This is mainly due to the current issues in Go with how package imports are handled. Since the Go port of hub relies on third party libraries, it uses Godep[1] to vendor its dependencies.

With /Godeps: 44838 LOC

Without /Godeps: 14733 LOC

[1]: https://github.com/tools/godep

lgas|11 years ago

I don't know the answer to your question, but even if we assume it is. Why do you ask? This is just one of many tradeoffs between the two languages. Do you think the number of lines of code is particularly important in this case for some reason?

lambda|11 years ago

Number of lines of code can be used as a (very) rough metric for complexity; expressing the same application in more lines of code may mean that the new implementation is a bit more complex, harder to work with, more to review, etc.

Of course, this is quite a rough metric; some languages are much denser per line (like APL/J/K and others in that family), so it's definitely not an absolute rule. But it can be interesting to compare a direct port of a reasonably complicated application from one language to another, to see how the abstractions in each language hold up; just like it can be interesting to compare the speed when porting from one language to another, even though there are plenty of caveats there too.