An anonymous coward writes:
"Mozilla is using work on it's next generation layout engine, Servo, to fine tune a new language used for writing that layout engine. The new language, called Rust, started as a personal project of Greydon Hoare and has since grown to be sponsored by Mozilla and Samsung. From the article:
The Rust language will power Mozilla's new browser, Servo, and its big selling point is efficiency. Because C++ crashes when it runs into memory allocation issues, it weakens any browser that uses the language. Mozilla designed Rust to be superior to C++ this way, more easily isolating tasks and promote a process known as "work stealing," which is when tasks from an overloaded processor are shifted over to another one.
Rust is a general purpose, multi-paradigm, compiled programming language developed by Mozilla Research. It is designed to be a "safe, concurrent, practical language", supporting pure-functional, concurrent-actor, imperative-procedural, and object-oriented styles."
(Score: 5, Interesting) by DeKO on Sunday March 16 2014, @02:15AM
And stop using explicit new/delete everywhere, that's "bad-style" C++. And write exception-safe code; no matter what language you use, if the code you write is not exception-safe, you will always end up with inconsistent/leaky programs when an exception occurs, be it an out-of-memory condition or a network timeout (e.g. thunderbird), no matter what language you use.
And before anyone starts replying with "but you can't afford an all-stars C++ dev team that knows how to write good G++ code", writing "not-bad" C++ code just requires some training and proper code reviews; just like learning a whole new language. One that's not even mature enough to properly support Windows platforms apparently, has very limited analysis tools, or even documentation.
I'm appalled that neither the Rust tutorial [rust-lang.org] nor the manual [rust-lang.org] mention error handling. So I can't even form an opinion on how exactly it's supposed to outdo C++ in reliability. Does it always crash the entire process in case of errors?
(Score: 3, Interesting) by TGV on Sunday March 16 2014, @08:18AM
Totally right. Ok, it takes a bit of effort to write good C++, but it can be done. I've had my simulations run for weeks without a single crash, with my own bloody memory allocation and everything.
And who's going to build the new language? How many people and time does that take? I can remember that it took quite a few years before the first C++ compilers would behave acceptably. And that requires skills above the level of writing a browser.