Proposal: change the Bits instance for Bool to align with other basic types and support branchless calculations
Brandon Allbery
allbery.b at gmail.com
Sun Sep 28 17:51:16 UTC 2014
On Sun, Sep 28, 2014 at 1:34 PM, Edward Kmett <ekmett at gmail.com> wrote:
> I can envision a point in Haskell's future where we might want to let the
> combinators in Data.Bits be the ones we use for Bool, where
> &&/||/and/or/any/all/not/ just smash things together with Bits and we
> generalize more of base.
>
> That would be an incredibly dumb thing to do with non-short-circuiting
> versions of the operators.
>
> I for one don't want to cut off that possible future for a 10% gain for a
> limited usecase.
>
My counter-question is: is it even worth considering this generalization if
it only makes sense for the Bool case? Because none of the other instances
short-circuit.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140928/ab2a686d/attachment.html>
More information about the Libraries
mailing list