Originally posted by mrugiero
View Post
Announcement
Collapse
No announcement yet.
Mozilla Updates To Rust 0.9 Programming Language
Collapse
X
-
Originally posted by profoundWHALE View PostI thought the point of D was to be a drop-in replacement for C, while at the same time being easier to code in. So all existing C code can just be compiled in D and all new code should be easier to maintain and develop.
Am I right?
Comment
-
I think Rust could work quite well as C/C++ replacement or at least alternative, now that they dropped garbage collection (gc and refcounted pointers are provided by std lib).
It has some nice stuff like traits(to implement interfaces), immutable variables by default, no raw pointers (well, not in safe code) and all the crap they bring with them.
So it is like a more safe variant of C++ without the template metalanguage stuff (some might consider this a plus ).
The only bit I personally am not thrilled about is the syntax, which on the first look seems like an amalgamation of a number of languages. But it gets the job done I guess. To quote Rust Reference Manual:
Additional specific influences can be seen from the following languages:
The structural algebraic types and compilation manager of SML.
The attribute and assembly systems of C#.
The references and deterministic destructor system of C++.
The memory region systems of the ML Kit and Cyclone.
The typeclass system of Haskell.
The lexical identifier rule of Python.
The block syntax of Ruby.
Comment
-
Originally posted by mrugiero View PostWell, rewriting the whole kernel just to switch language is a considerable task, for no short term benefit.
I don't understand, didn't you just said it's memory safe, but still he got a triple fault? Are they unrelated? Or is just the port still uses some C and that was the origin of the fault?
Comment
-
Originally posted by Marc Driftmeyer View PostRust will never replace C/C++. Get over it already. Make those languages meet your criteria through their standards specs.
Sure it probably won't replace C or C++. At least not for a looong time. But being a viable C or C++ replacement is a great goal. It's not like we don't know what we're doing; Rust is battle-forged from the pains of C++. Statically eliminating race conditions, iterator invalidation, and use-after-free is pretty cool.
Comment
-
Oops, I should've used google first. Here:
I’m working on a modular random level generator, the essence of which uses similar logic to that of a roguelike. Last month I benchmarked the effectiveness of various programming languages at…
It's only one benchmark of one program, but it gives a good idea as to the performance.
Comment
-
Originally posted by profoundWHALE View PostOops, I should've used google first. Here:
I’m working on a modular random level generator, the essence of which uses similar logic to that of a roguelike. Last month I benchmarked the effectiveness of various programming languages at…
It's only one benchmark of one program, but it gives a good idea as to the performance.
Comment
-
Nothing will replace C for the Linux kernel. There's no reason to replace it, there's too much code in C already and there's just nothing out there that performs as well as C, not even C++.
Go is more like a python contender from what I understand so that leave C++ vs D vs Rust.
You can make programming languages but they also need to catch on. D hasn't and I doubt it will C# has because MS pushed it and well it's also probably pretty good ( I like it because it's easy to read C# code).
The only thing that I do hate with all my heart in Rust is variable declaration :
Code:let price; let monster_size: int = 50;
We'll see if Rust catches on but I for one don't thing C++ is that bad if you know how to program in C++. Give it some extensions like boost or Qt and it's almost as easy as higher level languages like C# and Java.
Comment
Comment