"Model 2" prototype implementation
vlad.ureche at gmail.com
Sat Aug 8 17:15:03 UTC 2015
Brian, thanks the explanation!
I’m very excited that the translation maps 1-to-1 to the Scala requirements
(in the slide, the function R: Type -> Class is the right side, I called it
There’s one thing I’d still like to have, if it doesn’t interact badly with
It’s in the same vein as T.default, only working inside classes/methods
with anyfied type parameters:
Object T#box(T t)
T T#unbox(Object t)v throws InvalidArgumentException
The boxing and unboxing operations could be patched in during the load-time
class specialization (they could be wired to identity in the erased class).
Would you be able to fit this in?
Thanks a lot and looking forward to the full write-up!
PS: Normally I’d pick up the prototype and play around instead of asking
questions, but I’m writing my thesis, interviewing and preparing for
welcoming a baby, so I’ve got quite a few balls in the air right now.
On Fri, Aug 7, 2015 at 11:12 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
Yep, that's because we haven't told the whole translation story in its full
> gory detail yet. Stay tuned for the writeup. (Spoiler: it has to do with
> types with multiple avars where some are wildcarded and others are not,
> like Map<int, any>.)
> On 8/7/2015 5:03 PM, Guillaume Martres wrote:
>> On Friday 07 August 2015 16:09:14 Brian Goetz wrote:
>>> Most dispatch on Foo<any> receivers can proceed without indy; the
>>> prototype happens to use it for dispatching all calls on Foo<any>
>>> receivers, but this is neither necessary nor optimal.
>> Can you provide an example where it is necessary? I played a bit with the
>> prototype but couldn't think of an example where it would.
More information about the valhalla-dev