3 ms·
The value of a spec is having something that resolves how to deal with quirks discovered in an implementation. Absent of a spec, any implementation quirks becom
by randomdata 4y ago
The value of a spec is having something that resolves how to deal with quirks discovered in an implementation. Absent of a spec, any implementation quirks become a part of the language.
Which is okay as long as you only ever have one implementation, but when you want to, say, reimplement Typescript in Rust then you have to duplicate all of the quirks that came before, even in cases where nobody has yet realized that the quirk exists. Failure to do so means that your implementation won't be compatible with the canonical implementation.
At the other end of the spectrum, the Go project maintains two independent compiler implementations to ensure that the spec is implementable and to see that a single implementation, with all of its quirks, doesn't end up defining the language. That puts a lot of confidence in the spec to guide additional implementations, but, of course, is a lot of added work.
Tradeoffs, as always.