skaller wrote: > An interesting (and purely syntactic!) quandary: > Here: > > 1 + int * list as list > > the 'as' form is a fixpoint binder denoting recursion. > Question: is the 'list' above something you are defining? And what is the precedence of that 'as' above? Would you consider mu list. 1 + int * list as notation instead? [That leaves you open to also implement (nu list. 1 + int * list) for the greatest fixed point, which is nicely symmetric]
> But here: > > match xx with | (_ * ?y) as z => > > the 'as' is an assignment naming a type, i.e. a typedef > inside a pattern. I see this use of 'as' being easier to understand. > These things are correlated, and they can > be distinguished by whether there is an inner occurence > of the introduced variable. They are quite different: one occurs when defining a type while the other occurs while defining a pattern. In both cases, the context tells you right away which of the two you want. Now, types (with no binders) are "constant patterns", so that can be confusing... Sorry to bring up my own work, but see http://www.cas.mcmaster.ca/~kahl/Publications/TR/Kahl-Carette-Ji-2006b/ for work on semantics of pattern-matching that explains this [using way too much notation and category theory]. Jacques ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Felix-language mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/felix-language
