On a somewhat related note: if you really require non-integer indices, you can always try NamedArrays:
using NamedArrays m = NamedArray(rand(4), ([1//1, 1//2, 1//3, 1//4],), ("weird",)) m[1//1] m[1//2] == m[2//4] m[1//4] == m[4] ---david On Monday, March 16, 2015 at 8:50:13 AM UTC+1, Mauro wrote: > > On Mon, 2015-03-16 at 08:40, Christoph Ortner <christop...@gmail.com > <javascript:>> wrote: > > Lex, Stefan: Would it not be possible to throw an exception when the > > conversion is considered "unsafe"? > > That's the current behavior: > > julia> [1,2][1.0] > 1 > > julia> [1,2][1.0001] > ERROR: InexactError() > in getindex at array.jl:246 > > julia> [1,2][1.+eps(1.)] > ERROR: InexactError() > in getindex at array.jl:246 > >