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

Just to expand on one language, Rust, it possesses semantics that most other languages don't have. The presented problem with Swift would be impossible. As soon as you make the mutable variable, ownership of the object is transferred, and it becomes a compiler error to use the original variable after that. This is backed by the type system, encompassing both mutability and lifetimes, so it isn't a runtime enforcing the lifetime rules.

The more I learn about Rust, the more I realise how similar it is to Haskell. Even the error handling and IO uses monad-like constructions.



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

Search: