A Parametric Top Type?
I haven’t been writing much here lately (mostly because I’ve been very busy with my day job), but there’s a really interesting conversation going on right now in the Dotty repo.
It’s well worth reading the thread if you are interested in the fine details of Scala, and especially if you care about the type system. The high concept is to make the language more precise and correct by introducing a
Top type above
Any, or possibly modifying
Any, or other possibilities — it’s a deep discussion, and pretty fascinating.
ETA: here is a thread over on the Contributors Forum about the proposed
Matchable trait, which is the current version of the proposal — discussion is best on the Forum.