Ask HN: Why aren't there enough C & C++ Web frameworks?

8 points by slake ↗ HN
How come there are no nodejs equivalents for C & C++? They're faster, have better libraries and have a larger developer base!

16 comments

[ 2.1 ms ] story [ 52.0 ms ] thread
You should investigate "CGI", arguably the simplest such "framework"
Easy for C, getting shit done (tm) is something for pros. The subtlety of getting malloc, free, and pointer arithmetic in general, right just isn't easy for a novice coder.

C++ suffers from the same problem, just to a lesser degree.

node.js on the other hand has the advantage that nearly everyone who knows a bit of JS from his latest website gig can also do a node.js application.

Well isn't that really because nodejs has the V8 engine behind it which has created enough helper functions and libraries to make it easy to make a webapp on. Otherwise there isn't much on the barebones JS language itself to build a webapp is there? If C/C++ got those frameworks wouldn't they have had these libraries built as well.
You're right on the pointer arithmetic though. But JS callbacks are pretty confusing too. But ppl learn it because they have to.
The average website essentially boils down to a CRUD app of some sort. You're creating, reading, updating, and deleting text in a database.

Does using C really benefit the average new business with this task?

I'd love to do more C web-development, but it's sort of logical that C web frameworks aren't as common as other languages.

Yeah but if CRUD alone was what's important, doubt the world would have gone far beyond PHP, right?
Because it sucks to deal with strings in C & C++, and the web is mostly strings.
Is C & C++ really worse than Java at strings? Don't think so but I'm not sure. Can't imagine they're far apart.
C definitely - strlen() not binary safe, you have to deal with malloc()/free()/strdup() etc. by hand instead of letting a highly optimized GC do the job...
Or you could just strdup and malloc a bunch of strings and let the kernel clean it up when the cgi process exits. ;)
Yes. C & C++ strings are so bad that most large libraries ship with their own string functions.
In a way, all web frameworks are written in C - at least, the Python, Ruby, and PHP interpreters are written in C, and the V8 engine is written in C++ :)
(comment deleted)