"Model 2" prototype implementation
vlad.ureche at gmail.com
Fri Aug 7 15:17:17 UTC 2015
I’m opening a new thread, since "Model 2" prototype status went in the
syntax and semantics direction and I don’t want to derail it. First of all,
this is very exciting news and it will make translating Scala code to
Valhalla quite straight-forward (except for a few acceptable restrictions).
I’m wondering how will the implementation work?
Specifically, in this example, which assumes a specialized Box class defined
Box<int> box = new Box<int>(4);
Box<any> box_any = box;
// what does get() return? and how does it return it?
// even more interesting, how does this work:
System.out.println(box_any.t /* assuming the box value is visible */);
How do you translate the method calls and field accesses? Do they return
PS: Shameless advertising — I recently worked on a paper describing the
pitfalls I’ve encountered in miniboxing <http://scala-miniboxing.org> when
using erased views (and specialized views) and how to mitigate them, which
has been accepted for PPPJ 2015. In case you’re interested, an earlier
draft is available here <http://infoscience.epfl.ch/record/208797?ln=en>.
More information about the valhalla-dev