|
|
# A monomorphic binding syntax
|
|
# A monomorphic binding syntax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
behave just like the monomorhpic binding operator, but instead of having a new
|
|
behave just like the monomorhpic binding operator, but instead of having a new
|
|
|
operator, use parens as in:
|
|
operator, use parens as in:
|
|
|
|
|
|
|
|
|
|
|
|
```wiki
|
|
```wiki
|
|
|
(shared) = 3 + 4 -- monomorphic binding
|
|
(shared) = 3 + 4 -- monomorphic binding
|
|
|
```
|
|
```
|
| ... | @@ -11,14 +13,19 @@ operator, use parens as in: |
... | @@ -11,14 +13,19 @@ operator, use parens as in: |
|
|
|
|
|
|
|
see [ http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html](http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html)
|
|
see [ http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html](http://www.haskell.org//pipermail/haskell-prime/2006-January/000117.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**For:**
|
|
**For:**
|
|
|
|
|
|
|
|
|
|
|
|
- Simpler and more consistent than the M-R
|
|
- Simpler and more consistent than the M-R
|
|
|
- doesn't eat up a new operator
|
|
- doesn't eat up a new operator
|
|
|
- can be seen as a degenerate case of the standard 'pattern matching is monomorphic' rule
|
|
- can be seen as a degenerate case of the standard 'pattern matching is monomorphic' rule
|
|
|
- syntax makes it clear this is something that can happen to values and not functions
|
|
- syntax makes it clear this is something that can happen to values and not functions
|
|
|
- we are already used to (=) being overloaded in this way
|
|
- we are already used to (=) being overloaded in this way
|
|
|
|
|
|
|
|
|
|
|
|
**Against:**
|
|
**Against:**
|
|
|
|
|
|
|
|
|
|
|
|
- would make parentheses matter in a certain situation (n+k patterns and negative literals already do this) |
|
- would make parentheses matter in a certain situation (n+k patterns and negative literals already do this) |