Live data from Hacker News

C++: A language for next generation web apps

stevehanov.ca

31–40 of 99 posts

Re: C++: A language for next generation web apps

#31
post #30
post #23

Was anyone else let down that this was a sarcastic thing and not real?

Why believe it's satire? He's got an actual app already deployed and a full history of blog posts demonstrating his knowledge and interest in this field.

Here's a link to the C++ code for his app: http://stevehanov.ca/blog/index.php?id=8

Re: C++: A language for next generation web apps

#32
I thought at first that the article was sarcastic :-| I mean, what's taking time is not whether you use ruby python or c++ but the http request, request to the DB, IO or javascript loading..

And anyway, the part that really need to be optimized can still be done in C even if you use python.

There was a time I was a C++ guy who wanted to control memory and everything.. but now, I've got other things to do. If I can write 1 line that is more readable and cost less to type, why should I use C++ ?

And by the way, C++ isn't a verbose python. And, even if I once thought that boost was the best thing ever made, I feel that it's a waste of time. Instead of using meta-programming hacks to use lambda in a clumpsy/ugly way, why not simply use python or scheme ?

Re: C++: A language for next generation web apps

#33
post #14

It's perfectly sane to write web services (computationally heavy processes accessed via REST) in C++. But for the algorithm-light, marketing-heavy frontend to such a service, use something easier—the optimizations C++ offers aren't worth it there.

I don't have any experience with it, but I'm under the impression that MSVC / C++.net has all the goodies you'd need to do the easy frontend stuff also?

Re: C++: A language for next generation web apps

#35
post #32

I thought at first that the article was sarcastic :-| I mean, what's taking time is not whether you use ruby python or c++ but the http request, request to the DB, IO or javascript loading.. And anyway, the part that really need to be optimized can still be done in C even if you use python. There was a time I was a C++ guy who wanted to control memory and everything.. but now, I've got other things to do. If I can wr…

> I thought at first that the article was sarcastic

This article definitely is sarcastic.

Re: C++: A language for next generation web apps

#38
post #24

To be fair, after coming back to C++ after years in the world of Python and Haskell, it's not as bad as I remembered. C++ is actually a moderately effective functional programming language. With reasonable knowledge of the standard data structures, and using BOOST, one can actually write fairly expressive and effective C++ code. Most of the time, I feel like all I'm doing is writing a much more verbose version of Pyt…

The question isn't "Can C++ work?" or "Will C++ be faster?" because we all know it can work and that it will be faster. The question is "At what point does the extra development time become more expensive than just adding another server to my Ruby/Python/C#/Whatever App" For me, someone who learned C++ in school but has been in managed enviornments ever since, I'd be too scared to use C++. I'm not ashamed to admit I…

"because we all know it can work and that it will be faster"

Speed of execution depends more on the programmer's expertise than the language used.

Re: C++: A language for next generation web apps

#39
post #14

It's perfectly sane to write web services (computationally heavy processes accessed via REST) in C++. But for the algorithm-light, marketing-heavy frontend to such a service, use something easier—the optimizations C++ offers aren't worth it there.

I don't have any experience with it, but I'm under the impression that MSVC / C++.net has all the goodies you'd need to do the easy frontend stuff also?

Sort of - I don't think that the web templates and CodeDom are there like they are for VB/C#. It's also kind of a mess going between managed and unmanaged code, which you'd be doing extensively if you want to use the System.Web namespace. Managing references on the managed heap is an extra hassle that has a fair amount of complexity. To top it all off, the support for the managed C++ extensions has been lackluster.

Re: C++: A language for next generation web apps

#40
post #29

Earlier quoted context omitted.

Oddly enough I'm back to C++ too, after Ruby. One nice thing is; in a fast language, tests run quickly too. Also, Python and Ruby don't have the equivalent of an ASSERT (you could roll your own but it's not standard practice ). Also, C++ has standard hash lists and complicated data structure are actually going to run quickly. And while memory management can be a pain, you are doing it yourself so you can track down m…

RubyOnRails is very test gunghu, but to run a hello world test takes seconds , anyone know why? This seems very odd. Is this one of those do what I preach, not what I do things?

I doubt it takes seconds to test a hello world program in Ruby. However, to test a hello world Rails application is a different story, as you have to start up the web server, which takes seconds (even though it eventually just serves a simple page).
Post reply on HN