On Wed, Feb 23, 2011 at 4:49 PM, john skaller <skal...@users.sourceforge.net> wrote: > You can now put arbitrary expressions in patterns > by $(expr). The parens are required because I got lazy > and didn't bother with fiddling precedences.
Interesting. That's neat, but I'm wondering if it's a little non-orthogonal with the rest of the language. I was thinking about this from the opposite way. I was wondering if it'd be possible that if we take the "const" keyword and actually assume that the value is constant and fold it into the backend. I think this would require us to move pattern matching into the type binding... For example: body """ const int FOO = 5; const int BAR = 6; """; const FOO : int; const BAR : int; match 7 with | FOO => ... | BAR => ... | _ => ... endmatch We'd have to add a new construct to expose variables like errno. Perhaps "cvar"? By the way, what ever happened to the pattern calculus you implemented years ago? Is that still around? ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language