4 ms·
https://without.boats/blog/notes-on-a-smaller-rust/ https://without.boats/blog/notes-on-a-smaller-rust/ And the follow-up: https://without.boats/blog/revisiti
by sam_bristow 3y ago
https://without.boats/blog/notes-on-a-smaller-rust/ https://without.boats/blog/notes-on-a-smaller-rust/
And the follow-up:
https://without.boats/blog/revisiting-a-smaller-rust/ https://without.boats/blog/revisiting-a-smaller-rust/
- _nalply 3y agoYeah, Rust is very complex. But I am lucky that I had several years time to learn Rust, and let me tell you: as long you don't use async, nightly nor unsafe, Rust becomes manageable, at least for me. This said, I see another big problem of Rust. I think a lot of the complexity stems from Rust does not having a real language for compile-time. I sometimes dream of a scripting language similar to Rust which has as output Rust HIR, wasm or llvm IR. This scripting language implicitly quotes all code and that quoted code gets compiled. But if you don't quote, that code executes and is able to do all the things the Rust compiler does today (monomorphizing, desugaring, effects, state machine generation, etc.). Perhaps Rust wouldn't be as stuck as today, because more people would be able to innovate in creating more well encapsulated compile-time structures. A standard library module would implement generics by monomorphizing, another one module would implement async desugaring, and so on. I also think, this scripting language have simple core primitives and use managed memory. Because it creates tailored intermediate code, in the end we would have a zero-cost native implementation. Of course, to be honest, one downside is that compile-times could be very bad... Just a dream of mine, probably a pipe dream, but whatever, I had fun thinking out loud here.