4 ms·
The main purpose of Rust is to be a practical, safe alternative to C++. Go and D are NOT such languages, because of the mandatory garbage collection. From time
by Kutta 13y ago
The main purpose of Rust is to be a practical, safe alternative to C++. Go and D are NOT such languages, because of the mandatory garbage collection. From time to time there's been efforts to replace C++ with safer garbage collected languages such as Java or C#, and every time it basically failed. Direct control over memory has been proven pretty much essential in high-performance software. Thus, we're still stuck with C++, and we're still suffering for it, having nightmarish bugs and myriads of security holes and whatnot.
Rust at least tries to make an honest effort to change that. If and when it gets really fleshed out it'd be a boon to all those poor developers. And please forget your awfully subjective qualms about syntax (seriously, go and program in Haskell if you're all for pretty syntactic and cohesiveness - though I can't guarantee you won't find it "disgusting"). Memory management in the C++ way is bloody hard, and it's a dirty affair. It makes no sense to be repulsed by all the complexity there, because it's unavoidable, and it's a job that has to be done. Of course there's going to be a smattering of syntactical constructs to make memory management less tedious, just like there is extra syntactic baggage on bigger Haskell programs to accommodate the fine control over side effects.
Having a memory safe high-performance language with C++-like memory management is a HUGE thing. A while ago I would have dismissed such a thing as a pipe dream, and when I became convinced that Rust could work it was a moment of great rejoicing. Even if Rust ends up on the dumps, there has been at least an effort, and maybe someone will make a better Rust some day.
So please try to understand the purpose and rationale behind Rust before dismissing it in a superficial way.
- deleted 13y ago[deleted]
- pjmlp 13y ago> Thus, we're still stuck with C++, and we're still suffering for it, having nightmarish bugs and myriads of security holes and whatnot. There have been alternatives in the form of Ada, Modula-3 and Oberon, Cyclon and a few others. Except for Ada, they were left in the research labs. Looking to the history of systems programming languages, the only ones that have become mainstream have an OS vendor to thank for. So which OS vendor will push for a C++ alternative?
- robin_reala 13y agoMozilla is an OS vendor.
- pjmlp 13y agoSo when are we expected to be able to write FirefoxOS Apps in Rust?
- robin_reala 13y agoRust has the beginnings of emscripten targeting[1], so in the near future? [1] https://github.com/Yoric/Mozilla-Student-Projects/issues/33 https://github.com/Yoric/Mozilla-Student-Projects/issues/33
- pjmlp 13y agoMy idea was for them to run 100% at native speed. For running inside the browser I rather stay with JavaScript and friends.