Changes between Version 10 and Version 11 of ViewPatterns
- Timestamp:
- 01/24/07 22:21:21 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ViewPatterns
v10 v11 566 566 567 567 The disadvantages are as follows: 1) An extra syntactic construct that binds variables, the pattern binder, is required. 568 2) Even with pattern binders, simple patterns look aclunkier than Haskell's patterns.568 2) Even with pattern binders, simple patterns look clunkier than Haskell's patterns. 569 569 3) No attempt is made to check for exhaustiveness of patterns. 570 570 4) No attempt is made to integrate with Haskell's patterns, the idea is a proposal for an alternative when one needs more than simple patterns. 571 571 572 The examples at the top of this page would look like this with first class patterns: 573 {{{ 574 f = {%sing n} .-> n+1 575 |>> 0 576 577 g = {%sing True} .-> 0 578 .| {%sing False} .-> 1 579 |>> 2 580 }}} 572 581 === First class abstractions === 573 582
