4 ms·
>> The spec does not define the software. The software is as the software does. Having or not having a spec doesn't protect from bugs - people do. >> What you'
by thesuperbigfrog 3y ago
>> The spec does not define the software. The software is as the software does. Having or not having a spec doesn't protect from bugs - people do.
>> What you're taking about is covering one's ass, not specification.
They are related.
In safety-critical software, bugs can cause people to die. Without a spec, no one will use Rust for safety critical software. It would be too risky and no company would accept that level of risk.
For example if software that controls an airplane is written in Rust and an error occurs during flight, what happens? The software can't just panic and crash or the airplane might crash.
The Ferrocene project (https://ferrous-systems.com/ferrocene/ https://ferrous-systems.com/ferrocene/) is working on producing a safety-critical Rust specification (https://github.com/ferrocene/specification https://github.com/ferrocene/specification) because having a language specification matters for safety-critical work.
- duped 3y agoHow does a spec fix bugs?
- AnimalMuppet 3y agoIt doesn't fix bugs (in the language/compiler). It documents exactly what the language is supposed to do, and therefore what the language user can count on. Without a spec, all you can count on is what you can experimentally determine that the language does (and even then, you can't be sure that it will do that in all situations). This actually reduces bugs in applications, because it means that the app writers now know what the language will actually do, and can write their code accordingly. Without a spec, they will too often have a cargo cult understanding of what the language does, and so their code won't do what they intend it to. If there's a spec, and the compiler/language doesn't do what the spec says, now you can definitively say that it's a bug in the language. That can still cause bugs in your app. But at least you can now definitively say that the language implementation is at fault, and demand that they fix it, and you can agree with the language authors on what "fixed" means.
- duped 3y agoSo what you're saying is, a spec is no better than documentation and design documents. It doesn't sound materially helpful or like it saves lives - it seems like a contrived requirement.
- AnimalMuppet 3y agoYou do not have the right to put words in my mouth, or to claim that your twisted version is what I was saying. A spec is more detailed and more precise than (other) documentation and design documents. ("Other" because the spec is itself part of the documentation, and one of the design documents.) For the safety-critical software itself, you would demand a full, formal spec, not just "documentation". (At least, if you wouldn't, then others would. and they are right to do so.) But if you demand that for the software, doesn't it make at least some sense to ask it of the compiler? And even if you don't think it makes sense for the compiler, it seems reasonable that the standard libraries of the language should face the same requirements as the subroutines that are part of the safety-critical software.