[eeps] Request for comments on EEP-25 "Unnesting cases"
Robert Virding
rvirding@REDACTED
Sat Dec 20 00:44:30 CET 2008
2008/12/19 Ulf Wiger <ulf@REDACTED>
> 2008/12/19 Raimo Niskanen <raimo+eeps@REDACTED<raimo%2Beeps@REDACTED>
> >:
> > I would like you to submit comments regarding EEP-25 on the
> > eeps@REDACTED mailing list.
>
> I for one find it acceptable. The "; or case" construct is ok -
> perhaps not extremely elegant, but conveys the meaning
> very well.
Note that "; or case" is Richard's O'Keefe's way of writing it, "normally"
it would look like:
case Expr of
Pat -> Expr ;
or case Expr of
Pat -> Expr ;
Pat -> Expr ;
or case ...
Richard prefers using the separators as a form of keyword. You probably
don't need the extra 'or' though it might make it clearer.
As an alternative suggestion is to have cond but to extend the test to have
a boolena match:
cond
test1() -> ... ;
Pat = expr() -> ... ;
...
end
and allow guards. It wouldn't be as versatile as the suggestion in the EEP.
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/eeps/attachments/20081220/3e1ac3f0/attachment.htm>
More information about the eeps
mailing list