Programming languages without garbage collection send us down a long path of design decisions that lead to slow compile times and fragile runtime performance cliffs.
Haskell typeclasses work by dictionary-passing and are an example of subtyping-like behavior that works without requiring specialization to monomirphism.
-
-
More generally: a feature (like generics) shouldn’t require an optimization that carries drastic costs in compile time performance. It should work efficiently and then, optionally, monomorphism should be available as an optimization.
-
A hybrid approach would be fun to try out, but I fear it would be "worst of both worlds": still requiring a lot of specialization to make even isolated cases fast, yet not reaping the "zero (runtime) cost abstraction" benefits that end-to-end specialization guarantees.
- 3 more replies
New conversation -
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.