Hacker News new | ask | show | jobs
by ejcx 3845 days ago
I think the syntax is terse mostly for the sake of example.

There's a lot going on in about 3 lines.

1 comments

I don't think "terse" quite describes it. Python can be terse, as you can say:

    n = sum(x for x in my_sequence if x % 2 == 0)
But the Go code listed above is not just plagued with a lot going on in "3 lines". I think there's something to be said about gratuitous operators, and a sort of beauty to letting the parser do more work than the programmer themselves. I don't use Go at all, but from the example above I can tell it is a horribly grotesque language considering when it was created. Sure, even C or C++ have curly braces and array specifiers for types; however, at least these have the excuse of age and compatibility to work with. Go is relatively new, and I think that welder was getting at is that syntax shouldn't be some overly complex thing in this day and age. Nim and Elixir come to mind as two (newer) languages that avoid many syntax warts without making significant trade-offs because of it.
> I don't use Go at all, but from the example above I can tell it is a horribly grotesque language...

If you don't us Go at all then you can't tell anything from a single 3 line example. It's like judging an entire Linux distro based solely on a couple of screenshots.

What the he'll is going wrong with HN lately that I can't open a programming thread without superficial criticisms from someone who's never actually coded in that particular language, and troll posts about how Java / whatever is better / already supports feature x.....

People complain about the zealous attitudes of language fanboys, but honestly I think the dogmatic negativity on HN is becoming a far greater issue.

</rant>

Everyone's a PL expert.
And Python itself is pretty verbose compared to modern languages:

    mySequence.filter { it % 2 == 0 }.sum()