|
|
@pcwalton | |||||
|
I'm increasingly convinced that the interpreter solution is the only reasonable alternative for Rust.
|
||||||
|
||||||
|
|
Patrick Walton
@pcwalton
|
30. sij |
|
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".
|
||
|
|
||
|
|
Patrick Walton
@pcwalton
|
30. sij |
|
*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?
|
||
|
|
||
|
Watson Ladd
@WatsonLadd
|
31. sij |
|
Wait, why doesnt ML gave this problem?
|
||
|
|
||
|
|
Patrick Walton
@pcwalton
|
31. sij |
|
Uniform value representation. Traditionally, all values in MLs are one hardware word. This simplifies things a lot.
|
||
|
|
||
|
knights who say nikolai
@NikolaiVazquez
|
31. sij |
|
Have you considered what Swift does with generating vtables for the functionality required by the generic function?
|
||
|
|
||
|
|
Patrick Walton
@pcwalton
|
31. sij |
|
Yes, see other replies
|
||
|
|
||
|
Benjamin Smedberg
@nsIAnswers
|
30. sij |
|
I would love an interpreted rust with a fast dev cycle!
|
||
|
|
||
|
|
Patrick Walton
@pcwalton
|
30. sij |
|
Me too!
|
||
|
|
||
|
Chad Austin
@chadaustin
|
31. sij |
|
Is there a GHC-like middle ground where all generic values are boxed?
|
||
|
|
||
|
Ben Karel
@benkarel
|
31. sij |
|
If you can find the cycles to spare, laying out the constraints/reasons involved could make for a very interesting blog post!
|
||
|
|
||