News for hackers. Stuff that matters.
Re:Microsoft to Explore Using Rust by Scuds on Thursday July 18, 2019 @10:51AM (#20470415)
You don't want to have to rely on people being competent all the time. You want people to 'fall into the pit of success' instead of opting into several safety mechanisms that'll get you something that's 'pretty good'

Besides, if a language guarantees that all pointers are not null, initialized, not dangling, etc you have a solid foundation in which to build large systems.

Also - why are people even mentioning C#? Rust is a language for writing SQL servers, drivers, browsers, and other foundational components where a garbage collector wouldn't make sense. Just about all of my stuff deals with HTTP, which is farther up the stack from Rust's sweet spot.

Yes, you can ducttape rust style memory safety features into C# or C++, but I'd imagine using it is kind of like introducing asynchrony into a C# codebase - it wants to affect everything and if you don't you'll always be contending with the sync/async border. Better to make it a requirement and reap the rewards from knock-on effects.

Re:Microsoft to Explore Using Rust by pjmlp on Thursday July 18, 2019 @12:06PM (#20471210)
Because Microsoft has written several OSes in C# variants, with AOT compilation to native code.

They then took some of those learnings into Windows 8.x, UWP .NET Native and C# 7.x and 8.0 low level memory primitives.

A tracing GC, coupled with value types and manual memory management in unsafe code makes plenty of sense and has been done multiple times since Xerox PARC days.

The only thing missing is a company having the guts to push it no matter what. A bit like Google is doing with ChromeOS and Android.

Re:Microsoft to Explore Using Rust by ksec on Thursday July 18, 2019 @12:34PM (#20471488)
>The only thing missing is a company having the guts to push it no matter what. A bit like Google is doing with ChromeOS and Android.

This. I see a lot of the so call new idea and hype aren't actually new at all. It didn't succeed simply because it never got the investment or drive until it has sustainable critical mass. And every few years or decades we start to reinvent the wheel by new generation of developers.

Especially in tech industry where you are considered old if you are over 40, but in reality it is the age you finally see all the ideas keeps getting recycled again by newer generation and you could finally say meh, no.

Re:Microsoft to Explore Using Rust by arcticbull on Thursday July 18, 2019 @11:21AM (#20470739)
There’s nothing intrinsic to rust that makes it better suited for “foundational components” over anywhere else in the stack. Just because it’s capable of being used lower down doesn’t mean it’s a better or worse language higher up the stack. It’s probably got all the APIs or great crates you need for your work.

It’s not a language “for” anything per se, it’s ergonomic anywhere up the stack.

Re:Microsoft to Explore Using Rust by mitchty on Thursday July 18, 2019 @12:15PM (#20471316)
> There’s nothing intrinsic to rust that makes it better suited for “foundational components” over anywhere else in the stack.

Actually, there is, not having a GC means you can better reason about stack/heap memory usage. That matters for performance critical and things like embedded systems where you might not even use malloc() in c.

Re:Microsoft to Explore Using Rust by arcticbull on Thursday July 18, 2019 @01:46PM (#20472227)
I think I may not have phrased it well, I agree with you, it’s better than many other languages for low level software development. What I’m saying is there’s nothing that makes it worse for high-level software development.
Re:Microsoft to Explore Using Rust by tracker1 on Thursday July 18, 2019 @08:02PM (#20475142)
Depends on how your mind works really... I know a lot of devs that cannot break out of C# class and enterprise app thinking. I happen to like JS for a lot of workflows. It really depends on mindset.

Been learning rust for a few months now and really enjoying it so far... waiting on the new async stuff to firm up a little before continuing.

Re:Microsoft to Explore Using Rust by pacala on Thursday July 18, 2019 @02:16PM (#20472516)
Because explicit memory management has a higher cognitive overhead than implicit memory management, a GC-based language is more suitable higher up the stack.
Re:Microsoft to Explore Using Rust by arcticbull on Thursday July 18, 2019 @02:55PM (#20472889)
Rust memory management is in fact implicit. Sometimes you have to be explicit about lifetimes, but the two are not the same.
Re:Microsoft to Explore Using Rust by tracker1 on Thursday July 18, 2019 @08:01PM (#20475132)
For that matter, wouldn't be too surprised to see MS publish crates that give nicer interfaces to Windows internals or even linux, sql, azure or other platforms access.
Re:Microsoft to Explore Using Rust by tracker1 on Thursday July 18, 2019 @07:59PM (#20475126)
Because there is plenty of higher level systems interfaces that could be just as well written in C++, C# or Rust. Just because rust works on low-level problem spaces, doesn't mean it doesn't work higher up. Also, MS could very well create some of the applications in question with C# as well.