Constraints on definition of `length` should be strengthened
Sven Panne
svenpanne at gmail.com
Tue Apr 4 06:11:34 UTC 2017
2017-04-03 23:14 GMT+02:00 Nathan Bouscal <nbouscal at gmail.com>:
> On Mon, Apr 3, 2017 at 1:48 PM, Sven Panne <svenpanne at gmail.com> wrote:
>
>> Tuples *are* unbiased, the bias is just an artifact of seeing them as a
>> curried function, where the positions are "eaten" from left to right.
>> Again, this mathematically correct, but more often than not the main intent
>> of using a tuple-
>>
>>
>
> … no, they're not. What other type of correct is there than mathematically
> correct? "Zero *isn't* an integer, that's just an artifact of *seeing* it
> as an integer."
>
Tuples are unbiased cartesian products, full stop. All the left bias is
coming from currying. If you have a signature of e.g.:
fobar :: Int -> (a, b) -> Float -> Bar
I can't see any bias here. OTOH:
fobar' :: Int -> a -> b -> Float -> Bar
Now you have a left bias, because you can partially apply foobar' with e.g.
2 arguments, "eating away" the 'a', but keeping the 'b'.
> You can't get tuples to behave like they're unbiased. You can try to hide
> the fact that they're biased by getting rid of the only possible instances
> they can support, but that doesn't magically make them unbiased.
>
Again, tuples are unbiased, you just put an interpretation onto them which
is induced by currying, but which is not the intuitive one. I want to get
rid of that interpretation as the default one, because that's a
miscommunication of intents (see previous post).
> It sounds like you just want to rename tuples to Decorated. Maybe that's a
> good idea, but call it what it is.
>
Nope, my proposal is: Keep tuples what they are (unbiased heterogenous
collections) and make any bias explicit (Decorated).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170404/df9f26fe/attachment-0001.html>
More information about the Libraries
mailing list