| ... | ... | @@ -125,6 +125,19 @@ You might argue that it is inconsistent to allow ``(+)`` but not allow `(`plus`) |
|
|
|
This 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.
|
|
|
|
|
|
|
|
|
|
|
|
### Summary: pros
|
|
|
|
|
|
|
|
|
|
|
|
- Eliminates odd cases in the lexical syntax: `M..`, `M...`, `M....` are 1, 2, and 3 lexemes respectively in Haskell 98 (see also [QualifiedIdentifiers](qualified-identifiers)). This can be confusing, e.g. `[Monday..]`.
|
|
|
|
- A simple rule: if a lexeme begins with a letter, it is not an infix operator. Infix operators begin with a symbol character or ```.
|
|
|
|
|
|
|
|
### Summary: cons
|
|
|
|
|
|
|
|
|
|
|
|
- The syntax for infix qualified operators is heavier: ``Prelude.(>>=)`` vs. `Prelude.>>=`
|
|
|
|
- Using the workaround `let (>>=) = Prelude.(>>=) in ...` does not work, because `>>=` has the default fixity.
|
|
|
|
- ``...`` and `(...)` are not dual
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
|
|
| ... | ... | |