[nem-en] Re: Record pattern

Andrey Khropov andrey.khropov at gmail.com
Tue Jan 30 18:39:55 CET 2007


vc wrote:

> > It is the same when you do:
> > 
> >      | B where (FieldA = y)  =>
> > 
> > testing type is not supported in head of record pattern
> 
> Why? 

I guess because it's reserved to be used with variants.
If you allow it to use with classes it will be impossible to make
Uppercase-lowercase distinction for Variants/name bindings.

match( o ) // o is object
{
	| string => ... // variable binding because it starts with a lowercase 					//
letter
}

See some discussion here:

http://nemerle.org/bugs/view.php?id=827

> 
> It's will be very useful.

I'd like to see this too. 

-- 
AKhropov




More information about the devel-en mailing list