On Wednesday, April 30, 2014 2:31:43 PM UTC+1, Patrick O'Leary wrote: > > > It's a flexible type system, but it doesn't provide the power of ML or > Haskell. If you really, really want this, do a runtime check: > > reduce((==), [typeof(el) for el in a]) >
I feel that the difference between homogeneous and heterogeneous arrays is a very important distinction, and not some odd thing that you might only rarely care about. The distinction has a massive impact on speed. The point of Julia is to be a fast dynamic language. Hiding the distinction under the carpet seems contrary to one of the aims of Julia. Ivar's suggestion of: @assert isleaftype(T) is nice, but it doesn't feel quite right to me.