anyref would be the type of an arbitrary reference type object. The advantage is that all such types have identical size (one pointer) and metadata can be used to decide questions like "are you an instance of X vs. Y concrete types?" and "how do I free this memory?"
Having such a type would make it possible to build some basic (if unsafe) data structures without needing generics in the core language
anyrefwould be the type of an arbitrary reference type object. The advantage is that all such types have identical size (one pointer) and metadata can be used to decide questions like "are you an instance ofXvs.Yconcrete types?" and "how do I free this memory?"Having such a type would make it possible to build some basic (if unsafe) data structures without needing generics in the core language