News for hackers. Stuff that matters.
Re:Let the Type System do the Work by madisp on Monday April 21, 2014 @03:30PM (#7623129)
I wouldn't ever say that using floats compared to, say, precision decimals in any language is leaking an implementation detail.

As a user of a library/API I need to know if I can rely on it being precise or not.

Re:Let the Type System do the Work by judk on Monday April 21, 2014 @11:04PM (#7625531)
Float is an implementation detail. Precision is an API contract.
Re:Let the Type System do the Work by dllthomas on Tuesday April 22, 2014 @06:36AM (#7626811)
Right. An interface exposed with integers may wind up using floats internally, or vice versa; numeric algorithms may wind up doing arbitrary things to precision and accuracy; &c. "You are passing around a float" puts some bounds on what can be delivered but that isn't really sufficient information when it matters and is useless fluff when it doesn't.