News for hackers. Stuff that matters.
Re:Why Not Rust? (2020) by lucian1900 on Saturday December 18, 2021 @08:22PM (#29610475)
Famously, it even took many years for the compiler to be bootstrapped. That’s unusual in the extreme.
Re:Why Not Rust? (2020) by adgjlsfhk1 on Sunday December 19, 2021 @03:12AM (#29612298)
One thing that has been discovered over the past 50 years and applied over the last 30 or so is that writing a bootstrapping compiler for a young language tends to strongly bias the language towards being good at writing compilers (potentially to the detriment of other features). Compilers are essentially graph algorithms on loosely typed data. I think a lot of the reason it took so long for Rust and Julia to be invented is that they are both not very good languages for writing a compiler in, so in the era where all the new languages had bootstrapping compilers, no one would write a language with the sets of tradeoffs they have.
Re:Why Not Rust? (2020) by surajrmal on Sunday December 19, 2021 @06:22AM (#29613088)
I very much agree. In fact, taking it a step further, OS which self-host development also have this problem where they over optimize for an OS good at compiling and not necessarily good at other things.
Re:Why Not Rust? (2020) by atrn on Sunday December 19, 2021 @12:18AM (#29611577)
They had a functioning compiler and decided to concentrate on other areas and it's not too uncommon for a languages's compiler to NOT be written in that language. Afterall Rust relies on the non-Rust LLVM.
Re:Why Not Rust? (2020) by tmp538394722 on Sunday December 19, 2021 @12:03AM (#29611493)
> Unusual in the extreme

The most popular python and ruby implementations are written in C, right?

Swift is written in C++

It seems not sooooo unusual.

Re:Why Not Rust? (2020) by jacquesm on Sunday December 19, 2021 @04:55AM (#29612670)
Python and Ruby are not from the get-go compiled languages but interpreted ones.
Re:Why Not Rust? (2020) by ncmncm on Sunday December 19, 2021 @04:55AM (#29612672)
Writing the compiler for your new language in it amounts to wankage, these days.

There was a time when doing that helped convince people the language could do practical things, and might be useful because you might not have had a compiler you liked for your dev environment. Nowadays, though, there is so much support for coding compilers in an existing langauge that building one in the immature language means wasting a lot of time, and furthermore makes your language hard to change because maybe the compiler is using something you want to change. There are more impressive things to write in your new language that might be actually useful.

Thus, rustc is (mostly) not coded in Rust. Rust's demonstrator project was the guts of a browser, instead. Notably, that project was coded in a language substantially different from Rust both today and at the time.

Re:Why Not Rust? (2020) by mseepgood on Sunday December 19, 2021 @03:41AM (#29612411)
3 years is not that many years (Go is now 12 years old), and that's not unusual. There are other priorities when you have just released a new language.