Changes between Version 4 and Version 5 of MultiWayIf


Ignore:
Timestamp:
Dec 5, 2005 4:34:42 PM (8 years ago)
Author:
malcolm.wallace@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MultiWayIf

    v4 v5  
    4343}}} 
    4444Note the change in the equals sign, from one per guard to one per clause.  Case-style alternatives use -> instead of =.  However, this removal would break old programs. 
     45 
     46'''Bogosity alert.'''  The above observation is incorrect.  If all the definition-level guards are false, pattern-matching will fall through to the next clause or case-pattern.  But in the expression-level guards, this is not the case.  Intuitively, once you "cross the equals sign" from lhs to rhs of a definition, you are committed to that equation and cannot back-track.