News for hackers. Stuff that matters.
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.