[swift-evolution] Proposal: A standard library Fraction type

T.J. Usiyan griotspeak at gmail.com
Mon Dec 7 09:31:46 CST 2015


If your implementation of Rational simplifies immediately, sure. Mine
doesn't and it is useful in many other cases not to as well. You might, for
example, want to present the original numerator/denominator provided by the
user.

TJ

On Mon, Dec 7, 2015 at 8:16 PM, Matthew Johnson <matthew at anandabits.com>
wrote:

> > Musical time signatures and note duration. Visual code with proportional
> relationships.
>
> Time signatures cannot be properly modeled with a rational type you would
> expect to find in a numerics library.  3/4 is not the same as 6/8 in music!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151207/95ddeb28/attachment.html>


More information about the swift-evolution mailing list