Re:Side-by-side Nim and Go
by notacoward on Friday April 10, 2015 @09:10AM
(#9354019)
This doesn't look like a good-faith apples to apples comparison. Consistently, the Nim example just includes the core functions while the Go example includes that plus main() plus file-level boilerplate. Those aren't functionally the same. The funny thing is that (AFAICT) the point about Nim's greater expressivity would be even clearer without those misleading differences, and without all of that spurious vertical whitespace too.
[ Parent
| on HN ]
Honest question, as I don't know Nim... does it require any more, or are those legal programs as-is? I know, for instance, that you can simply run a Python program, no boilerplate required, and Python answers to these questions would have 0 bytes of visible boilerplate to "run". It's a reasonable observation that Go does have a bit of mandatory boilerplate.
Those are full, runnable programs. Nim's boilerplate is similar to Python's here.
Thank you.
It isn't. It's a rather mechanical comparison of Rosetta code fragments. It can be useful if your question is: "I know language A, how do I do the same thing in language B?"
As a straight-up comparison of two languages, it seems to be fairly useless.