6 ms·
A cool hack, but I can't help this feeling pointless in practice. It solves the problem of using Node userland code to do heavy computation. But a) serious de
by Animus7 15y ago
A cool hack, but I can't help this feeling pointless in practice.
It solves the problem of using Node userland code to do heavy computation. But
a) serious developers know better than to do heavy computation inside of Node anyway, and
b) it comes at an enormous, almost unforgivable cost: working with C++ is a nightmare compared to working with Node when it comes to realtime web projects (I've been in those trenches)
What would be exponentially more useful in practice is a concise, well-documented way to hook (multithreaded) C++ code into Node's engine.
But that wouldn't be nearly as sexy as a promise of Node, but with native performance.
- _stephan 15y agoWithout commenting on Node.native, I'd just like to note that C++11 isn't your grandparents' C++ anymore. An experienced programmer probably can write code in C++11 that is almost as elegant as, say, the equivalent C# code. And for larger projects many people would prefer something like C# to JavaScript, if only for the static typing.
- baq 15y agothe problem isn't writing code, the problem is build environment and deployment - correct versions of compilers, headers, libraries, makefiles, cmakelists, wafs, scons', bjams, whatevers...
- alexchamberlain 15y agoIs it really an issue? Are you proud of the fact that you can't sudo apt-get a few packages? I'm not a fan of moving away from Makefiles, however. Makefiles are sooo simple, why complicate it?
- baq 15y agosudo apt-get a few packages is great when it works, but if you want/need a newer boost version, you're on your own. Makefiles are tedious to write and maintain in anything but a toy application. That's not to say everything else isn't, but most of the time you can save yourself some hassle.
- omaranto 15y agoI used to feel that way about Make until I tried Rake. I'll never go back now, I think build scripts feel the need for a general purpose language often enough that it really pays to have them as an embedded DSL in a scripting language.
- pjmlp 15y agoMakefiles are only simple if you are only supporting a single operating system, and a few build configurations.
- dpiers 15y agoI've worked on a makefile that built shaders, libs, and assorted executables for multiple projects across 6 platforms, and I can confirm this.
- dkersten 15y agoIs it really an issue? No. Its not. I've been programming primarily in C++ for a few years (been using it as a hobbyist programmer since about 2002 and on and off professionally over the last 4 years) and this has never been an issue for me.
- _stephan 15y agoIf you're developing company-internal stuff, you can just standardize on one compiler and/or statically link everything.
- Animus7 15y agoI've actually been using C++11 for two years now (experimental stuff in GCC), and yes I agree: C++ is loads better than it used to be, and it's a pleasure to work with. That still doesn't mean it's a good idea to write a full web app in a C++ event loop while doing your own memory management. I've tried this (in C++11 no less), and it took nearly 30K LOC for me to admit defeat. I wish I were joking.
- jonstewart 15y agoA lot of systems these days are composed of multiple web services applications. It's nice to have idiomatic C++ web frameworks because it makes it very easy to create services around native C/C++ libraries. So, I might very well want to use Django or Rails or whatever for the main webapp, but dish out requests to custom C/C++ web services for things that are intensive and/or interface with native libraries. Having lots of little services communicating RESTfully seems like a good thing, and projects like this help enable that. Jon
- dkersten 15y agoit comes at an enormous, almost unforgivable cost: working with C++ If you are already writing an application in C++ which needs a web component, this may be an interesting choice.