Proposal: Add "fma" to the RealFloat class

Yitzchak Gale gale at sefer.org
Mon May 4 10:00:09 UTC 2015


Levent Erkok wrote:
> ...I think this proposal needs to be shelved for the time being.

Nevertheless, I vote for doing it now.

A better, more featureful, and more principled approach to
FP is definitely needed. It would be great if we could tackle
that and finally solve it - and I think we can. But that's a
huge issue which has been discussed extensively in the
past, and orthogonal to Levant's proposal.

In the meantime, adding new functions that provide access
to more FP functionality without adding any significant
new weirdness are welcome, and will naturally flow into
whatever future solution to the broader FP issue we
implement.

It makes little difference whether or not we provide a bad
but working default implementation; my vote is to
provide it. It will prevent breakage in case someone
happens to have implemented a manual RealFloat instance
out there somewhere, and it won't affect the standard
instances because we'll provide implementations for
those. Obviously a clear explanatory Haddock comment
would be required. Even better, trigger a warning if an
instance does not provide an explicit implementation, but
I'm not sure if that's possible. I'm still in favor of doing
Levant's proposal now even if the consensus is to omit
the default.

I vote for the usual practice of a human-readable
name, but don't let bikeshedding hold this back.

Thanks,
Yitz


More information about the Libraries mailing list