Generics and null
Jack
jackammo at protonmail.com
Sun Dec 31 19:17:14 UTC 2017
With generics soon to be expanded to also include primitive types, Value types, and data types, I'm under the impression that null (yes that elephant in the room that nobody likes to talk about) will be unsuitable as a default assignment for generic types. I'm not saying we need some sort of super null that encompasses all possible types, but how about a way to dynamically ask for the type-correct default value at run time?
Maybe something like this: T foo = assignmentCompatibleInstanceForThisGenericType T;
Thank you for your time,
Jack
More information about the valhalla-spec-comments
mailing list