xorebxebx wrote: |
---|
Ok, then. Writing a web-app in C++ is like writing a desktop app in PHP. You surely can do it but it is pointless. Now better? |
No, that's way off the mark. There's a huge benefit in performance between C++ and PHP. How is that pointless? And do you have that benefit with using PHP for writing a desktop app?
You're throwing ridiculous generalizations and you're on some weird zealot agenda, that's become apparent. The rest of us just say that there IS a time and place when C++ can be used in a web application. You just want to rule it out.
That site Galik pointed to was a good enough real-life example of how signifcant the performance difference can be:
http://www.wrensoft.com/zoom/benchmarks.html
(Java's not in there, but let's address one of your wild claims one at a time)
xorebxebx wrote: |
---|
But you still pay for starting a new process with every request. Starting a process is an extremely costly task, compared to just invoking a method call. The last time I checked, a simple Hello World application written in C couldn't be executed more than 100 times per second. On the same machine, a simple Java servlet runs at over 5000 requests per second (natively compiled code like C++, yet no process loading overhead). You are not able to reach that performance with CGI, even if you hand-coded it in assembly. You can do that with FastCGI, but you have to be totally insane to use C++ based FastCGI on a production server. |
Love the logic there. You can't do it because [reason] ... well you can, but "you have to be totally insane". So your reason really boils down to a very rational, "it's insane".
You obviously don't like to do manual memory management, and think of it as the most horrible thing in programming. Certainly it is a difficulty, and certainly it can be a hindering factor in certain development situations (where there's no benefit to be gained from manual memory management).
But you're either being blindly driven to prove a point, or plain ignorant to not recognize the advantages of manual memory management -- allowing for optimizations / data compression methods that cater to the nature of the data or the use of the data specifically, that wouldn't otherwise be possible. That is a fact, and a very real benefit.
Not every situation demands such an ability, but to claim that you never need that ability just means you're very close minded to the existance of situations you've not encountered yourself.
Success stories? I gave them before: Google, eBay and Yahoo all uses C++. Is that "success" enough for you?