3 ms·
I've been thinking about learning Go this summer, but this article just reminded me about D. Anone have any insights re the two?
by digisign 13y ago
I've been thinking about learning Go this summer, but this article just reminded me about D. Anone have any insights re the two?
- beatgammit 13y agoI use Go actively, and I come back every few months to D. In short, use Go if you want a simple, structure development environment, but use D if you want a better C++. I like Go because it's well designed, but I like D because everytime I review the docs, I learn something new. Here's some very basic analysis: Go is fantastinc for writing servers. The concurrency model is awesome and the standard library is surprisingly extensive given its age. It does work for non-server things, but it was developed for making concurrency as used in servers easier. There is no manual memory management, unless you use a C extension. Pain points: * no inheritence: it's fine for 90% of problems, but really annoying for the last 10% * super-strict type system: byte isn't implicitly convertable to int, for example * opinionated: code style, build system, etc.; everything can be worked around, but it's a recurring theme * no manual memory management: the GC is getting better, but it'll never be good enough for writing intense games D is awesome for writing more general software. The general feel is what C++ would have been if it was designed better. It has a stronger connection to C, so manual memory management is an option with free/malloc. However, most of the time you'd rely on the GC, but it's nice when you absolutely have to control things, e.g. for a game. Pain points: * not enough documentation: the website is awesome, but when you try to do something complicated (like write a game), it's uncharted territory * Annoying bugs, especially in CTFE: most normal operations work fine, so this isn't really an issue * no package manager: well, there is DSSS and Orbit, but I haven't found one that I like * no standard http lib: terrible if you want to do web-stuff I actually recommend them both. They're very different languages built for very different things, but you can't go wrong with either. Go 1.1 is about to be released (the "final" release candidate was released last week), and it has some cool new features (I like method values a lot). Then again, D has awesome metaprogramming support (templates are magic =D).
- personak 13y agoFor D, vibe.d is great for web development, and it comes with a package manager: http://vibed.org/ http://vibed.org/ http://registry.vibed.org/ http://registry.vibed.org/