160 points · by wspeirs · 11y ago · 52 comments
If MS picked up interest in Rust that'd be even more amazing. And it'd actually solve their security problems, unlike the more and more convoluted codegen they're doing for C++.
Edit: to be clear, I mean the security problems that their C++ codegen is trying to solve, like stack cookies, ASLR, or the new stuff they were boasting about at build in the ObjC VS2015 codegen video. (Some special function call thing that stores a map of legitimate function call targets and checks before calling.) All that stuff is eliminated by having a sound design in the first place.
According to the C++ code generation talk at Build, their new C2 compiler backend appears to evolve into something like how Apple is using LLVM for.
That being said, I'm really excited to see a single binary .NET application on Linux, as I like C# very much, possibly more than Go and Java.
For anything else, Rust will have to deal with existing languages that are also able to deliver results.
Regarding GC, not all GC were made alike and being able to use value types also helps.
Rust needs to find a sweet spot to pick up speed. Being yet another application language won't help.
http://joeduffyblog.com/2013/12/27/csharp-for-systems-progra...
I bet currently it already does better than Rust actual code generation.
Sure it still does have a GC, but so what. There are plenty of research OS with a systems language having one. What we need is a company with the guts to force one down developers throats.
In any case, there is still C++ for the unsafe parts available.
Given that only as of Windows 8, C++ was accepted into the kernel, it will take a while until another language gets to join it.
EDIT: Forgot to mention that .NET 4.6 adds more control over GC behavior.
However, the point I was actually trying to make is that for MS, the C# + C++ combo is the way forward and their tools offer great integration experience, so I don't see them adopting something like Rust any time soon. Specially given their relation with the C++ standards process.
I like your enthusiasm though :)
And look at this month's security bulletin from Microsoft. Once again, memory safety appears to be the leading offender. This is the same as it's always been. MS's critical CVE would drop by over 90% (I think more, but it's been a while since I tallied them all up) just by having memory safety.
These issues have been preached by us with experience in strong memory systems programming languages, e.g. Modula-2, Modula-3, Oberon, Ada, Pascal dialects...
But the industry needs to be exploited every day, spend huge pile of money in memory integer validation tools, the workarounds you mention (other compiler vendors do it as well) and still keep on fixing memory corruption exploits. To eventually start caring about this issues.
A visible side effect is the increase in Ada presence at FOSDEM in the last years, as well as, the industry acceptance of SPARK.
Back in the day I went to C++ from Turbo Pascal, because at least the language provided the tools to write safe code, if (big if) I cared to use them. So there was a path to achieve Algol type of safety.
The big issue is that due to its almost copy-paste compatibility with C, the added safety is not worth nothing if developers just keep on coding C with a C++ compiler.
Rust might eventually also suffer from this, given the amount of unsafe being used, I keep on seeing in code examples.
Windows + Rust has come a long way. It's still not perfect, but it's getting there!
Although, there are a few issues holding it back from being a pretty sweet Rust IDE...
-- (Major) The indenting for braces isn't handled properly. Try creating a function you'll see what I mean.
-- Errors in the Error List are too vague.
-- Would be awesome if the rustc build output was displayed in the Output window.
-- Syntax highlighting could be greatly improved, it's pretty basic atm.
There is also a Rust extension for the IntelliJ platform [0]. It supports some basic IDE features, but the last commit was in February. The Rust extension could fit really good to Jetbrains' new C/C++ IDE CLion.
Paul did a quick POC today [1] that added autocomplete, go to def and some basic code intel tooltips.
[0] https://fluentco.de/ [1] https://twitter.com/pzumbrun/status/599017886276026369
I keep hoping for a new age where editors can simply use the language itself to define structure.
Rust has great support for hooking in to the compiler and/or creating drop-in replacements. I'm hoping this pans out well and leads to some excellent tooling! :D
Any other Rust ide suggestions on MSWindows?
Not bad.