4 ms·
Consider how nice it would be is if when you matched (a,a,a) it checked to make sure they were equal. Probably can't do that for (_,_,_) It's a breaking change
by alexnewman 11y ago
Consider how nice it would be is if when you matched (a,a,a) it checked to make sure they were equal. Probably can't do that for (_,_,_)
It's a breaking change, but who would mind?
- madez 11y agoWell, do you mean equality by value or by memory location? I also hope they are not too conservative in the beginning, because we might have to pay for mistakes for a long time.
- alexnewman 11y agoYea perhaps it's just not as easy as haskell. But I was trying to make the meta point that not breaking compatibility between releases can be a bit subjective.
- FreeFull 11y agoEven if equality was by memory location in the case where the tuple contains pointers, one would still have to work out how equality would work for tuples of non-pointer types. For example, would (NaN, NaN) match (A, A)? If the implementation makes use of ==, then it wouldn't, and if it uses bitwise equality it would.
- deleted 11y ago[deleted]
- dbaupp 11y agoIt's not a breaking change.
- nightpool 11y agoWhy would that be a breaking change?