Comment

Comment by simplesocieties

The rust maintainers need to learn from the mistakes of the c++ design committee and understand that not adding a feature at all is in itself a desirable feature.

For example, your section on effects:

> Functions which guarantee they do not unwind (absence of the panic effect)

* I actually don’t see how this is any more beneficial than the existing no_panic macro https://docs.rs/no-panic/latest/no_panic/

> Functions which guarantee they terminate (absence of the div effect)

> Functions which are guaranteed to be deterministic (absence of the ndet effect)

> Functions which are guaranteed to not call host APIs (absence of the io effect)

The vast majority of rust programs don’t need such validation. And for those that do, the Ferrocene project is maintaining a downstream fork of the compiler where this kind of feature would be more appropriate.

I think rust is in a perfect spot right now. Covers 99.99% of use cases and adding more syntax/functionality for 0.001% of users is only going to make the language worse. The compiler itself provides a powerful api via build.rs and proc macros which let downstream maintainers build their desired customization.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton