Il giorno lunedì 23 marzo 2015 14:02:43 UTC+1, Milan Bouchet-Valat ha 
scritto:
>
>  That's because type inference has a hard time checking whether the type 
> of k remains the same in the global scope. You can declare k as const, or 
> wrap the code in a function.
>
>
I don't quite get this point:

the only way I see to change k while the comprehension is running would be 
another tread, is this the concern?

Even so: assuming Array{Any,2,2} won't save against a reassignment to k to 
an array of shorter dimension, or a scalar, or a string...

I can't see any gain in assuming Any instead of Float64 but I can see the 
nuisance of having an asymmetric behavior between different scopes.


Reply via email to