4 ms·
Rust does not have a spec, so all Rust behavior is undefined.
by Sir_Cmpwn 8y ago
Rust does not have a spec, so all Rust behavior is undefined.
- steveklabnik 8y agoThis is literally true but also overly reductive; we do make certain kinds of guarantees, even if there isn't a full specification of the entire language yet. The reason that a spec is taking so long is that we're interested in making an ironclad, really good spec. Formal methods take time. C and C++ did not have specs for much, much longer than the three years that Rust has existed. We'll get there.
- Sir_Cmpwn 8y agoIn my opinion as an onlooker of Rust, it seems more interested in shiny features and breaking the language every month than in becoming stable and writing a spec. It's far from replacing C in this regard.
- steveklabnik 8y agoWhat breaks in the language every month? That’s not the experience our users report. There are some areas where we do reserve the right to tweak things, but we take great care to ensure that these breakages are theoretical, rather than an actual pain. We have large (hundreds of thousands of LOC, and maybe even a few 1MM ones) code bases in production in the wild now, we cannot afford to break things willy-nilly. You are right that we are far, but that’s because it’s a monumental task, and it’s fundamentally unfair to expect equivalence from a young language. It is fair to say that it is a drawback.
- Sir_Cmpwn 8y agoThe language doesn't break as much today, but what constitutes "idiomatic" Rust is constantly changing. I don't use Rust but I spend a lot of time with people who do and am echoing what I've heard from them, and seen for myself as a casual user of Rust software and occasional drive-by contributor. It doesn't have to be a monumental task. Rust is simply too big, and getting bigger.
- steveklabnik 8y agoThanks. That’s much more reasonable, IMHO. Specs are always a monumental task. The first C spec took six years to make in the first place!
- Sir_Cmpwn 8y agoBut C never set out to be what it is today. It was a long time before anyone thought a spec was worth writing. For a language with the stated design goals of Rust, a specification and alternative implementations should be priority #1. You can't eliminate undefined behavior if you don't define any!