Live data from Hacker News

Rust is tier-1 language at Microsoft

rustfoundation.org

321–330 of 521 posts

Re: Rust is tier-1 language at Microsoft

#321

What’s the story for Rust-C++ interoperability these days? That’s what kills adoption. Most C++ devs I know like the idea of Rust, but no one is going to go rewrite 30 years of working code. It needs to be something you can incorporate gradually.

You might want to take a look at https://github.com/hkalbasi/zngur

Calling Rust from C++ seems to be more technically straightforward than the reverse.

Re: Rust is tier-1 language at Microsoft

#322

Earlier quoted context omitted.

Rust 1.0 was in 2015. Most of these languages you're thinking of out of the Handmade Community didn't even start development until around the point Rust 1.0 shipped. In theory Odin 2027, the 1.0 release of Bill's Odin language, is scheduled for, as the name suggests, early 2027. Zig does not have an announced 1.0 schedule, and who knows for the other two famous Handmade languages. From the rash of "C++ successor" lan…

To Odin's credit, it is used for production software that _isn't_ a toy (by the language's own authors). It is probably 1.0 quality already.

If you want to imagine a "1.0 quality" which means "Is used in some software that isn't a toy" then all kinda of crap counts. Bill has given specific goals, I don't think he'll meet them or perhaps even understands how high those bars are†, but even by his understanding Odin hasn't reached those goals.

Unlike Jai you can just download Odin and see for yourself, it has the particular things Bill prioritized (swizzling, a very particular way to do generic programming) and it doesn't have things which Bill feels are a mistake (most obviously package management, but also closures, first class user-defined types, macros, I could go on). The resulting perf isn't very good, and to me it "feels" clumsy to use.

One of the striking things in the Handmade languages is that they're so often wedded to LLVM and so in that respect they're much worse than C which of course isn't even wedded to modern architectural choices like 8-bit bytes, much less LLVM. Zig is the most free of this peculiar curse, which is ironic because years ago Bill called out Zig as unable to escape this, while insisting Odin would not require LLVM - the reverse of what actually transpired.

† In particular Bill thinks he's going to completely specify the language. Anyone who works on this problem for WG14 (C), WG21 (C++) or Rust knows that's basically a rabbit hole made entirely of more rabbit holes. I think Oracle's Java has a complete specification, and maybe TC39 has one for "Javascript" neither of those were uh, cheap or easy.

Re: Rust is tier-1 language at Microsoft

#323

Earlier quoted context omitted.

Rust 1.0 was in 2015. Most of these languages you're thinking of out of the Handmade Community didn't even start development until around the point Rust 1.0 shipped. In theory Odin 2027, the 1.0 release of Bill's Odin language, is scheduled for, as the name suggests, early 2027. Zig does not have an announced 1.0 schedule, and who knows for the other two famous Handmade languages. From the rash of "C++ successor" lan…

> other two famous Handmade languages Jai and... C3? FilC?

Jai and C3. I do not consider FilC to be a distinct programming language. AIUI the C I wrote twenty years ago would work with Filip's approach, maybe it needs minor tweaks in a few cases (mmap stunts for example) but likely not for much of what I wrote.

Re: Rust is tier-1 language at Microsoft

#324

Earlier quoted context omitted.

This kind of stuff is why its hard to have good conversations about tooling. Windows is the best place for many kinds of software dev, but perhaps not the kind you are doing.

When it is not the mandated option, under what circumstances is Windows the best choice for software dev? The only domain I can think of is gaming, and Valve is seemingly coming up fast to eat Microsoft's lunch in the next few years.

Valve is certainly increasing the viability of Linux as a platform for gaming, but I can't see developers targeting Wine or Linux for a major game over Windows directly. Not for a decade, if ever.

Re: Rust is tier-1 language at Microsoft

#327
post #148

Earlier quoted context omitted.

There have also been repeated statements from NSA & CISA that they recommend all development should be done in memory safe languages. It's abundantly clear that there is a strong headwind towards memory safety, whether that's Rust or GC'd languages.

The recommendation is qualified for typical apps that do not have extreme performance or scale requirements. They use Java for many, many things. C++ is still indicated for systems that are optimizing for performance and scalability characteristics, since it intrinsically requires a lot of "unsafe" constructs.

> C++ is still indicated for systems that are optimizing for performance

The only evidence I've seen for this is that people with a vested interest in my believing this keep saying it is true. That's the exact same evidence I have for Trump having triumphed in Iran. Do better if you want me to believe you.

> since it intrinsically requires a lot of "unsafe" constructs.

This is an excellent reason to choose Rust. The whole point of Rust's technology is to enable you to encapsulate the tricky difficult part of the problem so that people don't blow their foot off working on the mundane parts of the software. And the truth is there are always mundane parts of the software.

I'm feeling generous so I'll add more here: Vec illustrates how this works. This is a growable array type, C++ has std::vector for much the same concept. But inside Vec this encapsulation is used heavily so that there's a RawVec, which doesn't care about knowing how many things are in the growable array, only about its capacity, then a RawVecInner which doesn't even care what things we're keeping in the array, it's just an appropriately large container for whatever it is, that RawVec remembers what T is if that becomes important - and then a Cap which doesn't even contain things, it's just in charge of being able to represent the capacity correctly while having the same shape as "just" an integer but not always necessarily working like one.

Vec is entirely safe to use, very pleasant, no danger. But internally it's extremely sophisticated, hence the layers of different types encapsulating different pieces of the problem to make a growable array type with excellent performance.

Re: Rust is tier-1 language at Microsoft

#328
post #308

Earlier quoted context omitted.

What with this llms not so good in rust mantra? Something changed? In my experience they are pretty good, but haters gonna hate.

Most people it's good at syntax and the error messages give you a good loop. But the domains rust actually makes sense in tend to be quite punishing on slop both culturally and technically.

To add to this, I find that the delta between the amount of code and pain you get with good and bad abstractions is substantially higher in rust than other languages. It's alright to muddle through in Python or TS, but with Rust bad abstractions are punishing.

LLMs are pretty bad at picking abstractions.

Re: Rust is tier-1 language at Microsoft

#330

I hope announcements like this show that Rust is not a fledgling little language that moves fast and breaks things anymore. It's a mature, serious competitor to well established languages like C++ and C#. This is particularly important when trying to compare the experience of using Rust to other languages in the "better C/C++" space like Zig and Odin -- these are much newer and have more rough edges than Rust.

Rust is a serious contender for the next mainstream, widely adopted low level language.
Post reply on HN