Comment

Comment by kjksf

It's very poetic sentiment but doesn't really address the issue of trade-offs.

Is writing if a { .. } else {} so much worse than if a then .. else .. end (Ruby requires then/end instead of {}.

Python's indentation based syntax (which I think is great) cleverly solves the problem of requiring explicit statement delimiters but it's also a reason why lambda: is limited to one-liners. There's no free lunch.

To Go's credit they did put a lot of effort and design thought into removing line noise from syntax (compared to C) by e.g. adding an automatic semi-colon insertion rule, eliminating braces around if argument etc.

Overall, while syntax is not as clean as Python's, it comes pretty damn close.

parent kjksf 16 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton