Empty value type ?

forax at univ-mlv.fr forax at univ-mlv.fr
Tue Jun 26 15:49:31 UTC 2018


Hi Kirk,
there are lot of examples in the history, on top of my head,
a type represent the absence of value like unit, void or bottom, a type that represent the result of a throw, a type that allows HashSet<E> to be defined as HashMap<E,Empty>, a transformative type like a marker type that separate arguments, like in foo("a", "b", "c", marker, "d", "e") with the semantics that the values that follow the marker will be boxed/gathered into something, etc. 

Rémi

----- Mail original -----
> De: "Kirk Pepperdine" <kirk.pepperdine at gmail.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "Tobias Hartmann" <tobias.hartmann at oracle.com>, "valhalla-dev" <valhalla-dev at openjdk.java.net>
> Envoyé: Mardi 26 Juin 2018 17:36:09
> Objet: Re: Empty value type ?

> How can a value type be empty.. what is an empty integer? An empty string? Just
> curious.
> 
> Kind regards,
> Kirk
> 
> 
> 
>> On Jun 26, 2018, at 3:28 PM, forax at univ-mlv.fr wrote:
>> 
>> ok,
>> in that case, i think zero field value types should be rejected by the compiler.
>> 
>> Rémi
>> 
>> ----- Mail original -----
>>> De: "Tobias Hartmann" <tobias.hartmann at oracle.com>
>>> À: "Remi Forax" <forax at univ-mlv.fr>, "valhalla-dev"
>>> <valhalla-dev at openjdk.java.net>
>>> Envoyé: Mardi 26 Juin 2018 15:23:46
>>> Objet: Re: Empty value type ?
>> 
>>> Hi Remi,
>>> 
>>> no, empty value types are not planned to be supported for LW1.
>>> 
>>> Best regards,
>>> Tobias
>>> 
>>> On 26.06.2018 15:19, Remi Forax wrote:
>>>> Is empty value type targeted for LW1 ?
>>>> 
>>>> Error: LinkageError occurred while loading main class GenBug
>>>> 	java.lang.ClassFormatError: class: GenBug - Value Types do not support zero
>>>> 	instance size yet
>>>> 
> >>> Rémi



More information about the valhalla-dev mailing list