Proposal for generics over primitives needs a rethink
forax at univ-mlv.fr
Sat Jan 3 15:12:08 UTC 2015
On 01/01/2015 04:22 AM, Gavin King wrote:
> On Wed, Dec 31, 2014 at 11:58 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>> Just to add that there is another cost with the C# approach, you must have
>> exactly the same bytecode for Set<int> and Set<boolean> so you can not by
>> example, specialize Set<boolean> to use a bitset.
> I don't follow what you're saying here. Set is an interface in Java.
> There can be multiple implementations of Set<boolean>.
>> About the introduction of a type Any in the VM, it means that now we have a
>> type that can store a primitive or a reference,
>> we know how to represent this kind of type using tag bits (like V8 does) or
>> Nan boxing (like Mozilla"s *Monkey VM does).
>> Basically, representing Any in the VM is like asking for transform a Java VM
> Exactly! Precisely the solution I prefer! This is, after all, 70's tech :-)
but it doesn't mix well with late 90's GC algorithms.
More information about the valhalla-dev