Do you mean the passing of classes as additional arguments? I haven't seen the horrible thing.
Overall I think C# got this one right. Generics are right there in the binaries.
bUt ActuALLy, I think the rightest right thing is to do specialization up to representation at link time (or compile time), when the whole program is available, ala MLton. Virgil does this. Of course this is not possible in a dynamic code loading environment but I only have so many fucks to give in this life.
Re:JITs are un-ergonomic
by pizlonator on Monday March 30, 2020 @12:13AM
(#22725182)
No, I meant that the Class format has metadata about what the genetics were so some java.lang.reflect thing can query about what the genetic type was. I don’t think it comes with soundness guarantees.
I agree C# got this right.
I agree that doing specialization up to link time is ideal from a certain standpoint.
Also it’s not really true that genetics are erased. There’s that horrible thing javac does so that the VM can support reflection for generics. I get your point though.