6 ms·
Not exactly gotchas, but things to learn. Syntactic complexity is the first barrier to entry to any language, and it's the hardest part to learn as you go, bec
by gkya 6y ago
Not exactly gotchas, but things to learn. Syntactic complexity is the first barrier to entry to any language, and it's the hardest part to learn as you go, because in general looking up functions (or classes, etc.) as you need them is easier than looking up syntax (and esp. syntactic patterns, like `<type> <name>(){}' or `val ? branch : branch'.
I.e., say we need ten features to make up any language. Perl arranges six of these into syntax. Go arranges say two of these into syntax. C++ arranges five into syntax. For D, I've had little exposure but for better or worse let's say it arranges 4 into syntax. For each, the rest are in the std lib. The extreme cases would be, maybe Scheme for 1/10; can't think of any 10/10 syntax languages.
In that light, we can say that Go requires less upfront investment in order to become productive and read code easily: learn two features + how to lookup docs. Versus in D: learn 4 features + how to look up docs.
That's pretty ad hoc, but I hope it helps get the point across.