Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actually if you are using C++ on the server there would be an argument for using it in a sandbox like NaCl. After all, you don't want to get pwned on the server any more than the user wants to get pwned by a web game.


C and C++ are already being heavily used on basically all servers.

Linux, the BSDs, the various commercial UNIX systems, OS X, and Windows all make very heavy use of C, and also C++ in some cases.

Apache, nginx, lighttpd, and many other web servers are written in C or C++.

The same goes for the major database systems commonly used today.

The main interpreters for languages like PHP, Python, Perl, and Ruby are written in C. Even if you're using a Java implementation of those languages, or some other language that targets the JVM, the runtime you're using is most likely written using C and C++.

So I find it kind of silly to hear Ruby and PHP advocates say how it's "dangerous" to use C or C++ for server-side development. Their preferred stacks are already essentially all C and C++! The amount of C and C++ code powering their applications dwarfs the amount of Ruby or PHP code they might have written.


Well, it would be dangerous to let those developers write application code in C++.


True, but the other languages don't necessarily help with that, either. PHP doesn't prevent programmers from writing code susceptible to SQL injection attacks. Ruby doesn't prevent programmers from writing poorly-performing web apps that are brought down or rendered unusable with a even minimal level of traffic. It's dangerous to let those kind of developers write any code.


You can make C safe, it just takes lots of effort, as you see in the software you mentioned. Other languages may require less effort to write safe programmes in.




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

Search: