Ask HN: Do you C++ for Web App Dev?

https://news.ycombinator.com/item?id=609613
by janitha • 17 years ago
5 9 17 years ago

How come C++ is so rare in the web app realm?

It's a pretty bad choice for using on frontend of sites, but for backend stuff where you have CPU bound tasks it's great. Lean and Fast. But when ever I bring this subject up, I get weird or confused looks...

* Some reasons I am given is that it's complicated. Not really, writing web applications in C was complicated, but with the C++ STL and Boost, lot of your generic things are a breeze like string manip, not to mention the millions of other libraries out there.

* Development time: For me writing a Python or PHP app that does the same thing takes equally the same amount of time as writing it in C++. (this is for backend related stuff like computations and other CPU hard stuff, not front end)

* Other's are equally fast. They can be, but you have to add additional layers on top, accelerators, caching systems, etc etc and make sure everything is all optimized. A lot of things on top of what you would normally do to achieve a C++ level app aperformance

C++ with FastCGI is a excellent choice for backend development, yet it's so rare. I don't even recall a single time this was brought up during web development talk or conference.

Why do you think this is?

(Backstory: The backend for our project is a lot of C/C++ on FastCGI on Apache. My workflow usually consists of Pyhton for prototyping and verification of design, then writing it in C++ for production, the speed is not even comparable).

Related Stories

Loading related stories...

Source preview

news.ycombinator.com