[e-lang] Guard-based pattern expansions
Mark S. Miller
markm at cs.jhu.edu
Fri Apr 28 04:46:24 EDT 2006
If we keep via but use the just-proposed syntax to make via and guard patterns
not seem similar, we could also stop allowing guards on list patterns. Of the
expansions previously listed as non-problematic, the only one that would need
to change is:
> '[p0, ..., pn_1] + r' to '[p0, ..., pn_1, r] :__SplitList[n]'
would instead expand to
'via (__splitList(n)) =~ [p0, ..., pn_1, r]'
If we get rid of guarded list patterns, guards would only be able to guard
variable definitions and the ignore pattern ("_"). I think this will interact
well with Zooko's auditing proposal, which I will explain shortly.
Text by me above is hereby placed in the public domain
More information about the e-lang