Thanks for confirming, Steven.

Btw, this is also a really interesting 
read: https://github.com/JuliaLang/julia/pull/10525

On Sunday, November 15, 2015 at 9:48:54 AM UTC+8, Steven G. Johnson wrote:
>
> See also
>
>     https://github.com/JuliaLang/julia/issues/10154
>
> where a lot of this was discussed.
>
> Non-integer indices often indicate a mistake on the part of the programmer 
> (e.g. using / rather than ÷, i.e. div), and it is more reliable to force 
> the programmer to be explicit about what was intended (both to indicate 
> whether they want round/floor/ceil, and to correct unintentional type 
> instabilities that often accrue from accidental floating-point indices).   
> It is also a headache for people implementing AbstractArray subtypes, 
> because it creates an expectation that they will implement non-obvious 
> getindex methods for Real types, with calls to the to_index method as 
> needed.
>
> I feel like 99% of the problems that people have with deprecating 
> floating-point indices arise because they used / rather than ÷ for an 
> integer division.   I wonder if there is some way to give a helpful warning 
> in such cases?
>

Reply via email to