Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust 1.0 is supposed to be somewhat minimal, so things like custom operators and monadic syntax are out scope since they can be bolted on in a backwards-incompatible way in future versions. Active patterns would probably also fall under this.

Likewise, having functions have their own private global state is not on the table, and seems to me to actually be unsafe since the function could be called at the same time in two different threads overwriting the operations done to them.

For not warning when returning non-unit values for unit returning functions, a lint could probably help there.

Type inference isn't changing. The rule is that items need to be explicitly declared and expressions are inferred. Closures are expressions while most (all?) functions are items. It's a purposeful limitation on inference based on experience with prior languages.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: