I'd vote for D.
There will still be churn, but it's much smaller nowadays; once we hit 1.0 we will be committing to backwards compatibility.
C changed going to ANSI C, and C++ change a lot from "C with classes" to the first standard. And D, the one you would "vote for"? Wasn't there the whole mess between 2 versions of the language and libraries?
So, why should Rust be any different, considering it's still in design and pre-stable?
When the spec freezes and Rust hits version 1, it would be a fully suitable language for his needs.
Java compilers to native code:
- VMKit
- gcj
- Excelsior JET
C# compilers to native code:
- Windows Phone 8 deployment
- NGEN
- Bartok
- Mono with -aot
Additionally C# has control over memory layout via pointers, aligment attributes, marshaling, structs and generics.
> Additionally C# has control over memory layout via pointers, aligment attributes, marshaling, structs and generics.
This is not true. The level of control you get is extremely limited due to the fact that very few types are values in C#.
So is C#, bytecodes are only used as a storage format.
With Microsoft tooling you can JIT at load time, NGEN at installation time, convert to MDIL when uploading to Windows 8 App Store, or convert to pure binary with Bartok in Singularity.
With Mono tooling you can JIT at load time or generate binaries with mono -aot.
With Cosmos OS , it gets compiled to native code.
> This is not true. The level of control you get is extremely limited due to the fact that very few types are values in C#.
Please provide an example where Go compilers offer more control than C# ones.
type T struct {
X, Y P
J *Q
Z [42]struct {
A R
W [100]S
}
}
Please note that P, Q, R and S are arbitrary types, not just a subset of value types, and an instance of T is contiguous in memory.I was actually under the impression that any value type could be used in fixed buffers.
You can however workaround that by using fixed byte buffers with serialization, but it is not so programmer friendly.
I also like Rust, but I'll wait until it's more stable and we have a couple of books to learn from.
Since you cannot easily use Rust libraries from C -- where is the .h header file generator? -- you cannot easily use it from any scripting engine either. How would its language constructs carry across on the C ABI anyway?
So, Rust also accidentally becomes a final, top-level language, competing in that space with Javascript, Python, Ruby, PHP, Perl, Lua and so on.
Rust does not stand a shadow of a chance in that space. Therefore, it can only suffer a fate worse than C++, which in spite of all problems can still be accessed from scripting engines.
Now, D and Rust are another story. After doing a bit of reading, I'm actually very excited about Rust. For me, Go is essentially completely useless: it fills the same niche as Java, C# or--far more importantly--Haskell or OCaml. If I need code that's relatively fast but don't want to sacrifice memory safety or the convenience of a high-level language, I can do much better than Go.
On the other hand, if I want really low-level access to the system, for whatever reason, I don't have many good choices. I could do C, but that's rather unsafe and unpleasant; I could do C++, but it's a gigantic, overly complex language and also rather unsafe and unpleasant and I could do D. (I've actually heard good things about D but have never tried it.)
Rust gives me the perfect alternative--a simpler, higher-level language that's more pleasant to use but still lets me operate at a relatively low level. So next time I need to do something like that (which, honestly, probably won't be soon), I'm almost definitely going to use Rust, even if it's in active development and changing all the time.
EDIT: In re-reading this comment, I have realized that "high-level" and "low-level" really aren't great terms (at least the way I'm using them). Particularly, they're not mutually exclusive: a language can both support a high level of abstraction and provide low-level systems access where needed. Of course, I can't think of any language that actually does this, but Rust seems very promising.