32 ms·
Yeah, I understand that, but the examples were supposed to be impressive in their simplicity. You can mix types in an array even in C, but the code you'd need t
by natrius 17y ago
Yeah, I understand that, but the examples were supposed to be impressive in their simplicity. You can mix types in an array even in C, but the code you'd need to write to do so makes it unattractive.
If the comment was "But you don't get any type checking" instead of "My language can do this too", then it'd make perfect sense.
- tetha 17y agoMy point was: Yes, you can cram differently typed values into the same array, but this won't make sense unless all elements in the array share a common interface to access them. If this is not the case, all the dynamicness is useless, because you cannot do anything with the elements inside the array. And once I arrived at this important realization, all the discussion of 'yay, I am SO dynamic' kind of fell over, because a lot of things reverted to the same principle of interfaces and programming to interfaces.