Random thought: It sure is nice that we went with typed generics in Rust instead of untyped templates like C++/D/Nim/etc, so that we can even *have* the monomorphization debate at all.
Wow, this issue is a pet peeve of mine as a user of D on a large codebase. Had the urge to create a language to show case this dual compilation mode, but now I don't have to. Does rust have this already?
-
-
FWIW, Swift implements generics via separate compilation (lots of dynamic dispatch under the hood), and has optimization passes that monomorphize based on usage. The model works fairly well, although the performance can sometimes be unpredictable based on what gets monomorphized
- Još 4 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.