Deprecating fromIntegral

Sven Panne svenpanne at gmail.com
Thu Sep 28 15:43:31 UTC 2017


2017-09-28 0:22 GMT+02:00 Niklas Hambüchen <mail at nh2.me>:

> This suggests that the order is:
>
> 1. put it in base
> 2. wait 3 releases
> 3. build consensus about deprecation
> [...]
>

For the current proposal I would really like to see:

   0. Put the proposed functions into a separate package

At least for me, it's far from clear what exactly has to be added, how
usable it would be, how many changes are needed in libraries/apps out in
the wild etc., and removing/changing broken things from base is very, very
hard. So it would be wise to let a proposal mature in a separate package.
But that's a general remark for everything which should go into base.

Regarding fromIntegral: I fail to see why this function should be special
in any way. If you use one of the fixed-width integral types, you basically
opt-in into a world of wrap-arounds, silent under-/overflows etc. As
already mentioned in this thread, this doesn't only happen when
fromIntegral is used, it can happen for tons of other operations, too. For
the same reasoning, one would have to deprecate (+), (-), (*) etc. on
fixed-width types.

So in a nutshell: -1 for deprecating fromIntegral, +1 for additional
conversions (but not in base yet).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20170928/4bc26b97/attachment.html>


More information about the Libraries mailing list