Changes between Version 4 and Version 5 of QualifiedOperators


Ignore:
Timestamp:
Jul 9, 2009 11:16:23 AM (5 years ago)
Author:
simonmar@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QualifiedOperators

    v4 v5  
    7474This proposal simplifies the story for composition: we don't have to worry about whether you need a space after `Prelude..`.  Also, `Prelude.(.)` is much easier to read.   The only disadvantage I can see is that it could break some code, but probably very little. 
    7575 
     76=== Summary: pros === 
     77 
     78 * Eliminates odd cases in the lexical syntax: {{{M..}}}, {{{M...}}}, {{{M....}}} are 1, 2, and 3 lexemes respectively in Haskell 98 (see also QualifiedIdentifiers).  This can be confusing, e.g. {{{[Monday..]}}}. 
     79 * A simple rule: if a lexeme begins with a letter, it is not an infix operator.  Infix operators begin with a symbol character or {{{`}}}. 
     80 
     81=== Summary: cons === 
     82 
     83 * The syntax for infix qualified operators is heavier: {{{`Prelude.(>>=)`}}} vs. {{{Prelude.>>=}}} 
     84 * Using the workaround {{{let (>>=) = Prelude.(>>=) in ...}}} does not work, because {{{>>=}}} has the default fixity. 
     85 * {{{`...`}}} and {{{(...)}}} are not dual 
     86 
    7687== References == 
    7788