3 ms·
D is featureful and harmonious but it's inevitably complex. With Go, you learn the grammar in one or two days and from then on almost all you'll ever need is th
by gkya 6y ago
D is featureful and harmonious but it's inevitably complex. With Go, you learn the grammar in one or two days and from then on almost all you'll ever need is the library docs. It has a Scheme-like quality in that aspect, but it combines that with a usual procedural imperative approach and a standard library that has more than call-cc.
A lot of languages have a lot of "syntactic sugar" but actually what's important is more invisible basics: good GC, good concurrency primitives, good method dispatch, good and comprehensive standard library, supportive compiler, etc. Go has a few warts (the whole select / <-chan syntax, god-mode functions like `make', the interface{} problem, the whole go mod / dep kerfuffle), but it does tick all those boxes.
Ofc all that modulo the Google factor, but then there's Dart...
- pjmlp 6y agoDart tried to replace JavaScript and faced oppposition from Apple, Mozilla and Microsoft on that regard. Just like we have WebAssembly because those same companies did not bought into PNaCL.
- raverbashing 6y agoTo me the weirdest thing about Go is the package/directory thing It's a weird way of enforcing structure and the last time I looked into it I couldn't get my head around it
- mhh__ 6y agoThere aren't really that many gotchas in D, either. I may be misremembering, but when I was learning D the only thing the spec was useful for was for metaprogramming, everything else was pretty obvious.
- gkya 6y agoNot 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.