3 ms·
Isn’t it its own language to a degree? Which may or may not be a bad thing in itself, but I do think there is value in having it natively available.
by kaba0 3y ago
Isn’t it its own language to a degree? Which may or may not be a bad thing in itself, but I do think there is value in having it natively available.
- nextaccountic 3y agoIt is, but that's just Rust's style. The stdlib is deliberately kept small, so that an ecosystem would flourish. In the design by contract case, there's a lot of experimentation (I linked this https://old.reddit.com/r/rust/comments/17miqiu/is_ada_safer_than_rust/k7m7tl5/ https://old.reddit.com/r/rust/comments/17miqiu/is_ada_safer_... in another comment) and while all of them are converging to the same syntax, they all have wildly different implementations. Perhaps the stdlib could provide a base syntax for contracts, with extensibility APIs so that libraries or compiler plugins or external tooling can determine whether the contract is checked at runtime or at compile time, and by which method. But that demands a lot of design, because once something is in the stdlib and stabilized, it's here forever.