On Sat, Jan 28, 2012 at 11:24 PM, Tony Arcieri <tony.arcieri / gmail.com>wrote:

> On Sat, Jan 28, 2012 at 10:43 AM, Peter Vandenabeele <
> peter / vandenabeele.com
> > wrote:
>
> > That means to remain truely backwards compatible, we would need something
> > like:
> >
> > 1.1 #=> Float (machine dependent)
> > 1.1BD #=> BigDecimal ("unlimited" size)
> > 1.1D #=> Decimal (e.g. picking the standardized IEEE 754 2008 Decimal128
> > fomat)
> >
>
> I don't think it'd be very Ruby like to have a separate literal syntax
> depending on the size of the number. Some precedent:
>
> >> 1000000000000000.class
>  => Fixnum
> >> 10000000000000000000000000000000000000000000000000.class
>  => Bignum
>
> --
> Tony Arcieri
>

Yeah, but Fixnum and Bignum have different behaviour. I am pretty sure they
are substitutable for eachother in every way, they just handle different
domains for performance reasons (transparent to the user, without any
reasonable exceptions). Float and BigDecimal, however, do have different
behaviour and hence do have the need to specify which you want.