Hacker News new | past | comments | ask | show | jobs | submit login

It would usually be a wrong tool for all of these reasons:

1. There isn't a low-level performance bottleneck within most web-dev code. It's almost all occurring at levels slightly above that(disk access, network bandwidth, database queries, horizontal scaling). The stuff that needs to eke out another 50% in an inner loop through optimizing cache access or careful use of hardware parallelism tends to be a single algorithm or batch process that can be developed independently of the larger application.

2. For eliminating whole categories of errors, there is a bounty of options out there that can claim to improve on C++ through better tools, type systems, and compiler technologies. Even Java, as maligned as it is, can constitute a credible step forward.

3. Good C++ developers aren't that common. There are plenty of junior developers who are eager and ignorant of the potential dangers, though - they will make a mess in any environment, but they'll make a bigger one when given power tools. (This is the argument for Go, and w/r to the case of low-pass-filtering junior devs it definitely makes sense.)




Some counterpoints:

1. There are a number of reasons one might choose C++ that aren't related to low-level performance in almost any application. For a particular web application it may or may not be a good choice, but I wouldn't categorically reject it, even for a class project or assignment web app.

2. Any language or suite of them has whole categories of errors, deficiencies in tooling and other issues that can make it suitable or not in the hands of a given team. C++ has more or fewer of these than other languages depending on the context.

3. This seems to be hurling a pretty broad insult at many C++ developers, and "good" requires context.


Obviously this is a very late response to this thread, but I thought I'd add what I actually ended up building for this assignment.

The requirements were specifically to build a game, any game, and as long as it was playable (and your code was readable) you'd get an A.

So, annoyed as I was at the requirement that the backend be built in C++, I decided go above and beyond the requirements and built a single page Othello game, complete with a strong and fast AI (I happened to take this class much later in my studies than the standard curriculum called for, so I had already taken an AI class and had learned how to build a minimax tree with alpha beta pruning, though up until that point I'd only ever done it in Lisp).

So, by changing the actual requirements of the project, I actually made C++ a more appropriate choice of tools for this project and was able to build a very responsive single page Othello game with a strong AI capable of running pretty fast on the hardware we were tasked with using.

I was the only one who used Ajax to make it a single page app, and the only person to build an AI. Needless to say, I got the best grade in the class, but I suppose I had an unfair advantage.


> There are plenty of junior developers who are eager and ignorant of the potential dangers, though - they will make a mess in any environment, but they'll make a bigger one when given power tools.

I've often wondered about this. c++ has a tendency to fail fast and hard whereas higher level languages can lead to a false sense of security/understanding. Blowing your foot off isn't necessarily a bad thing.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: