2009/12/9 Hans Aberg
The rule that 'chuck' seems to use on explicit lists is to look at the first entry. If that number is without a decimal point, the list is of type int[], if has one, it is float[].
Yes, and I agree this is at times inconvenient.
It would be easy to fix: look at all entries, and set it to int[] exactly when all numbers are without a decimal point.
I disagree. I want it to be set to float when I tell it to be a float. I may want to use a list of numbers without decimals as a float. This may be because the numbers will later change, or because of member function overloading (for example with LiSa.rate() it matters a lot whether the argument is a float or int), or because I want divisions to work in a certain way. As I see it array definitions are currently inconsistent with the implicit cast from int to float that we have elsewhere. Yours, Kas.