Changes between Version 9 and Version 10 of ViewPatterns


Ignore:
Timestamp:
Jan 25, 2007 6:08:07 AM (7 years ago)
Author:
tullsen@…
Comment:

Add Related Work: First Class Patterns

Legend:

Unmodified
Added
Removed
Modified
  • ViewPatterns

    v9 v10  
    553553and are much more limited than view patterns (by design they cannot do computation). 
    554554 
     555=== [http://citeseer.ist.psu.edu/tullsen00first.html Tullsen: First Class Patterns] === 
     556 
     557First Class Patterns is an approach that attempts to 
     558add the minimum of syntax to the language which---in combination with 
     559pattern combinators written within the language---can achieve everything 
     560and more that Haskell patterns can do.  They have the value-input feature. 
     561 
     562The advantages are  1) They are simpler than Haskell's patterns;  2) Patterns are first class. 
     5633) The binding mechanism (the pattern binder) is orthogonal to the the pattern combinators: 
     564the hope is that one can stop changing the syntax/semantics of patterns and concentrate on writing the 
     565combinators (as Haskell functions). 
     566 
     567The disadvantages are as follows: 1) An extra syntactic construct that binds variables, the pattern binder, is required. 
     5682) Even with pattern binders, simple patterns look a clunkier than Haskell's patterns. 
     5693) No attempt is made to check for exhaustiveness of patterns. 
     5704) 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 
    555572=== First class abstractions === 
    556573 
     
    559576 
    560577 * [http://hackage.haskell.org/trac/haskell-prime/ticket/114 Claus Reinke's lambda-match proposal] 
    561  * [http://citeseer.ist.psu.edu/tullsen00first.html Tullsen: first class patterns] 
    562578 * [http://ttic.uchicago.edu/~blume/pub-cat.html Matthias Blume: Extensible programming with first-class cases] (ICFP06) 
    563579 
     
    571587combines two abstractions, with failure from the first falling through to the seoond.   
    572588 
    573 Blume and Tullsen have a similar flavour.  None of these proposals say 
     589None of these proposals say 
    574590anything about the patterns themselves, which in turn is all this 
    575591proposal deals with.  Hence orthgonal.