logoalt Hacker News

dralley • today at 2:03 PM • 1 reply • view on HN

It's unlikely that many people are using Rust without using Option<T> or Result<T, U> a fair bit. Idiomatic Rust fundamentally uses a lot of generics. And a basic for loop expands into quite a lot of intermediate representation due to Iterator.


Replies

ModernMech • today at 2:31 PM

Other languages support generics, monomorphization, and iterators (e.g. Zig or D), but they're not as slow as Rust to compile, what's the reason for that?

➕ show 3 replies