Question on layer/peeling
mikeb01 at gmail.com
Tue Jan 6 02:43:47 UTC 2015
> (Public service announcement: Any talk about "spec" is woefully premature;
> what we've got is an idea on a white board.)
Ooops, s/spec/draft proposal/g
> The case you describe is what we call "implementation by parts", where
> there is a method who is a member of Foo<any T> but which might have
> different implementation depending on whether T is a value or an (erased)
> reference. This is one of the use cases described in SotS, and such things
> come up in a number of places inside the implementation of Collections.
That was my expectation. I toying with a specialised HashMap to a feel for
how specialisation will work. I'm assuming that the layer parts aren't
implemented yet - I couldn't find anything in a cursory browse of the
commits. Is there something I could do in the meantime as a hack (e.g.
instanceof check and downcast to Object)?
More information about the valhalla-dev