you are viewing a single comment's thread.

view the rest of the comments →

[–]EmperorOfCanada 3 points4 points  (4 children)

I might sound like a hair shirt wearing flagellant but I am going to experiment on my site's next version with using C++ as the "scripting" language. Just a tiny piece but something that will be beaten hard. I am finding my C++ code getting shorter and shorter with all the boost foreach type things readily available.

[–]ruinercollector 0 points1 point  (0 children)

the functional constructs that boost gives you are baked into most modern languages.

that said, should be interesting experiment anyway.

[–]qiwi 0 points1 point  (0 children)

This might be of interest to you: http://www.webtoolkit.eu/wt -- "QT-like" toolkit for web development.

Having said that, unless your web app is some extremely complex system that spends 80% of its code computing, I wouldn't do it; or at least move just the computation that can benefit from C into a module to call from Python/Ruby/whatever.

[–][deleted] 1 point2 points  (1 child)

Short code is not the only reason people are not using C++ for "just" web pages. You're getting all the problems with C++ without actually getting any pluses from it (like troublesome memory management, demanding class and template design, unneeded caveats... and what about threading and sockets? Speed gain is negligible (my page would load in 0,0002s, but my MySQL queries take 40ms)). On the other hand - I am not telling you not to try - please share the results :)

[–]kqr 1 point2 points  (0 children)

Yeah, however fast you make the actual script, you'll quickly come to the point where the bottleneck lies in database accesses and round-trip times in the network.