4 ms·
I really want an excuse for learning D. I'm currently working as a full stack web developer using Node.JS and JavaScript. What I like about D on the surface is
by z3t4 7y ago
I really want an excuse for learning D. I'm currently working as a full stack web developer using Node.JS and JavaScript. What I like about D on the surface is that it compiles fast, so I'll still have a fast feedback-loop. It has support for named lexically scoped modules which I like so much about Node.JS, but without the performance penalty. It doesn't seem to enforce any particular programming paradigm. And that it allows another level of optimization which you can only get from a "systems" language.
- earenndil 7y agoThe vibe.d[1] framework is nice, for server-side; maybe rewrite one of your services in that? 1: https://vibed.org/ https://vibed.org/
- giancarlostoro 7y agoAnother side note is that the vibe.d devs got sick of the callback hell of nodejs[0] and made Vibe.d as a result. [0]: https://vibed.org/features#simplicity https://vibed.org/features#simplicity
- Doxin 7y agoI love how in vibe.d you have a single callback function which can then just deal with its client with code that looks a hell of a lot like blocking code but is secretly yielding control to other connections whenever it'd block.
- paavohtl 7y agoCallback hell was solved years ago with promises and async-await.
- z3t4 7y agoActually I prefer callbacks over promises, but it can sometimes be nice to have async/await aka. pseudo-treads / co-routines or "fibers". I belive it's much easier to learn about first class functions, then to learn the concept of Monads, and Promises was rushed into the JavaScript language, while it would have been better to wait for userland libraries to settle on a standard before carving it in stone.
- TheSmoke 7y agoas a d user, i definitely do not recommend d for web development. for everything else, go for it. it's just because d does not have a mature web development ecosystem. i'm hoping this will change soon but this is the case for now. i simply don't want you to be disappointed when you finally decide to jump in.
- jordigh 7y agoI've only dabbled with Vibe.d, but it seemed quite mature to me. Well, maybe not "mature" but usable; I would have liked a little bit more documentation for Diet templates, but they weren't that hard to pick up from examples.
- z3t4 7y agoI do not like web frameworks. All I need is a websocket module with legacy fallback. Something like SockJS, to build a JSON API on-top of. And a database module for persistence. But I use Node.JS for almost everything; image rendering, network services, utility tools. etc. And if a bash script requires more logic then a bunch of unix pipes I usually write that in Node.JS too. I like that D can be used like a scripting language. Node.JS started out as an async networking framework focusing on performance, simplicity and fast development. Despite it's huge potential it has mostly become a scaffolding tool for web frameworks. What concerns me most though is TypeScript as well as EcmaScript piling on mostly useless features to the JavaScript language, making it harder to learn, and dividing the community.