Easy to say "monomorphization is awful and Rust should never have done it", harder to say "I want all generic functions to be compiled to bytecode and to embed a Rust interpreter in every binary".
-
-
*I'm* actually OK with this as an opt-in compilation mode, at least for cold functions. But are the people complaining about compilation time OK with it?
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wait, why doesnt ML gave this problem?
-
Uniform value representation. Traditionally, all values in MLs are one hardware word. This simplifies things a lot.
End of conversation
New conversation -
-
-
Have you considered what Swift does with generating vtables for the functionality required by the generic function?
-
Yes, see other replies
End of conversation
New conversation -
-
-
I would love an interpreted rust with a fast dev cycle!
-
Me too!
End of conversation
New conversation -
-
-
Is there a GHC-like middle ground where all generic values are boxed?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If you can find the cycles to spare, laying out the constraints/reasons involved could make for a very interesting blog post!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.