__WhereRef/WhereVal peeling, #ifdef and related experiments

Gavin Bierman gavin.bierman at oracle.com
Mon Jan 19 11:15:53 UTC 2015


The “meet” terminology comes from maths: given a partially ordered set S, the meet of a subset of S is the greatest lower bound (if it exists). 

In OO type systems, it is typically used in the context of overloading: e.g. if you have overloads whose argument types have a common lower bound (i.e. a common subtype) then you must have an overload with argument types of that common lower bound.

For example, Fortress had such a restriction (see section 1):

http://www.mpi-sws.org/~skilpat/papers/multipoly.pdf


Hope this helps,
Gavin


> On 19 Jan 2015, at 01:27, Thomas W <twhitmore.nz at gmail.com> wrote:
> 
> Thanks Brian. As I noted, Maurizio's patch is not a real syntax..  just a
> hack to take experimentation further.
> 
> Brian doesn't want to discuss syntaxes, nor was my intent to suggest such
> -- just to move the concepts away from preprocessors, #ifdef and
> single-dimensionality.
> 
> There are many ways to slice type-casing; your example shows one (though
>> you need a "meet rule" when you get to the multiple-tvar case), but there
>> are others.
> 
> 
> My post specifically raised the possibility of multiple-tvar cases, and
> suggested a simple rectilinear approach in multi-dimensional space. There
> would need to be order of precedence in match rules, but no interaction
> would exist between separate clauses.
> 
> I'm having difficulty Googling an exact definition for "meet rule" -- if
> you want to email a definition privately, I'd appreciate -- but apart from
> most-specific L-to-R order of precedence, no such rule would be needed.
> 
> Let me know if anything is unclear.
> 
> Regards,
> Thomas



More information about the valhalla-dev mailing list