Correct me if I’m wrong, but a[1] begin valid even after a = 1 isn’t really a sign of array-ness in Julia - it’s valid exactly because there’s a method getindex(::Int) defined somewhere. So you really need to add *index-ability* to your list of properties that a value can have.
// Tomas On Friday, September 12, 2014 6:32:19 PM UTC+2, Patrick O’Leary wrote: On Friday, September 12, 2014 11:20:27 AM UTC-5, [email protected] wrote: >> >> Actually, >> a = 1 >> a[1] >> is also valid. >> >> But >> a = 1 >> a[1] = 2 >> is not: is `1` an array or not? >> > > Iterability, immutability, and array-ness are separate properties. >
