Allowing floating-point values to specify array lengths was discussed pretty early on in the development of Julia (in 2011!), and was ultimately rejected. See the discussion here Matrix constructors should be able to take floating point value for size · Issue #136 · JuliaLang/julia · GitHub and here Pass integer valued floats to matrix constructors · Issue #1972 · JuliaLang/julia · GitHub and here zeros(1e4) -> ERROR: no method Array(DataType,Float64) · Issue #4275 · JuliaLang/julia · GitHub for example.
6 Likes