Paul Sandoz paul.sandoz at
Mon Jun 26 18:43:47 UTC 2017

> On 26 Jun 2017, at 11:08, John Rose <john.r.rose at> wrote:
> On Jun 26, 2017, at 10:46 AM, Paul Sandoz <paul.sandoz at <mailto:paul.sandoz at>> wrote:
>> Separately, in my enthusiasm i may be going down a rabbit hole regarding re-construction, arguably it’s not in the spirit of minimal. Still at some point i think we should explore this notion of a more extensible wither for value types (but it also seems application to ref/data classes too).
> FTR, more on reconstrucors: <>
> In that document, reconstructor is mostly a language-level concept with small
> tweaks at the VM level (to make <init> slightly less unique).  So, yes, it isn't part of MVT.


> I think what you've found is that method handle combinators are a place where we
> can experiment with the use of reconstructors, before language changes.

Yes, in this regard i was thinking it was a subset of the extractor and pattern matching problem e.g. a theoretical source equivalent of:

  Point p = ...
  if (p match Point(x, _, z))
    return new Point(z, another_y , x)
    throw new Error()

>  But that's
> not MVT either, I think.



> Another thing we have learned about value types is that they don't really have
> an <init> method; they have factories.  We'll *need* that concept for value types,
> and it will turn out to be *useful* for object types.  So at some point we'll have
> to coin a name that is the factory version of <init>, perhaps something like <new>,
> <instance>, <make>, <factory>, etc.
> Again, none of the above is minimal, unless and except it somehow gets MVT
> out the door faster.
> — John

More information about the valhalla-dev mailing list