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.
-
-
But if we have garbage collection, we can store our large data structures once with whatever type is required, then dynamically create wrappers that reinterpret it as any subtype that’s required. We pay the cost of GC and indirect control flow for accessors but that’s all.
Show this thread -
Unfortunately, most languages missed this opportunity. The C family including C# and Java are overly imperative and lost variance due to wrongly-scoped mutability. And functional languages have generally chosen type systems lacking subtypes, covariance, and contravariance.
Show this thread
End of conversation
New conversation -
-
-
I keep seeing people on here saying generics were a mistake.
-
Java generics did the best it could given that it was retro-fitted onto a broken Simula object model. But as anyone who used Java containers before generics can tell you, generics were much better. The underlying problem was "everything is an object" which misunderstands types.
- 2 more replies
New conversation -
-
-
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.