5 ms·
People often ask for "simplified x", but it's often not clear how they envision that. What would you remove from Rust to make it simpler?
by Thiez 4y ago
People often ask for "simplified x", but it's often not clear how they envision that. What would you remove from Rust to make it simpler?
- apatheticonion 4y agoIf we wanted to retain its use as a systems language I would probably mostly focus on improving the module system. Coming from higher languages, Rust's module system is very restrictive and forces applications to be written in monolithic files. Tests are often in the same files that the working code is in. I know the Rust community likes this, but it's something I have found has a negative impact on maintainability and organisation. I think TypeScript does an excellent job at managing modules. If we look at the language with the goal of applying it to application development (web servers, GUIs) then I'd start with the simplification of the type system. There's no need for &str and String. There's no need for the various ways of describing accepting a function as a parameter or the need for types as structs - just have them as language built-ins. I would include algebraic types, structural typing and simplify the borrow checker using keywords like "read" "write" rather than & and &mut. In fact, I actually wrote an entire language specification but am not smart enough to write a compiler. I'm still figuring out how to translate lifetimes https://github.com/alshdavid/BorrowScript https://github.com/alshdavid/BorrowScript
- sph 4y agoThe complicated stuff.
- Ygg2 4y agoThat's the issue. Different people see different stuff as complicated.