4 ms·
> Nice balanced writeup! However, I am not convinced one can make something solving all the things Rust solves which is substantially simpler as language. I us
by verdagon 4y ago
> Nice balanced writeup! However, I am not convinced one can make something solving all the things Rust solves which is substantially simpler as language.
I used to think this too, but my opinions have evolved a bit.
Recall the transition from goto-heavy assembly code to C; it solved all the things assembly solved, and was a substantially simpler language. One of the keys to designing a good language (or any good abstraction, really) is to identify the patterns that already informally exist.
So if we want to see a simpler Rust, we need to look at the informal patterns that exist in Rust.
* Zig did this with Rust's async/await, by making it colorblind. [0]
* Vale did this with Rust's generational indices, by making generational references, a way to get memory-safe single ownership without a borrow checker. [1] It then adds a hardened FFI boundary to get more solid safety guarantees than Rust could. [2]
* HVM did this for Haskell by looking at Rust's particular blend of borrowing and cloning, and making it happen automatically. [3]
* Lobster did something similar for an imperative mutable language, to reduce RC costs lower than ever before. [4]
I think Rust is an amazing first attempt at an interesting new problem space, and a huge step forward for the field. Now, language designers are starting to notice that the building blocks that Rust trailblazed might be combined in new interesting ways, to make new interesting languages.
It's an exciting time for programming languages!
[0] https://kristoff.it/blog/zig-colorblind-async-await/ https://kristoff.it/blog/zig-colorblind-async-await/
[1] https://verdagon.dev/blog/generational-references https://verdagon.dev/blog/generational-references
[2] https://vale.dev/memory-safe https://vale.dev/memory-safe
[3] https://github.com/Kindelia/HVM https://github.com/Kindelia/HVM
[4] https://www.strlen.com/lobster/ https://www.strlen.com/lobster/
- nyanpasu64 4y agoSaying C solved all the problems assembly solved is a bit too strong; bootloaders and kernels, green thread or coroutine implementations (like libco), and cryptographic code are all implemented in part in assembly.
- flohofwoe 4y agoIMHO if C could solve all the same problems as assembly, it would need to be down on the assembly language level - which it isn't, C is clearly a high level language, it's much closer to any other programming language than any assembly dialect (maybe with the exception of Forth-like languages). In general, the higher level the language, the more flexibility you need to give up (but that's ok for many solutions).
- verdagon 4y agoGood point, the statement was too absolute. Perhaps I should instead say that for a lot of use cases C solved enough of the problems that assembly previously solved.
- Sammi 4y agoWow, this perspective makes me really excited for the future of new programming languages. Thanks.
- ghoward 4y ago> Zig did this with Rust's async/await, by making it colorblind. Zig's async/await is not colorblind. [1] It just appears that way at first because the compiler infers as much as it can at compile time. [1]: https://gavinhoward.com/2022/04/i-believe-zig-has-function-colors/ https://gavinhoward.com/2022/04/i-believe-zig-has-function-c...