Werner Punz wrote:
Well exactly, and in case of earlier prototype versions
the array was broken that way, now if
another library used for(var p in anarray) the for
iterated wrongly.
Thanks for the follow ups Ryan and Werner.
Werner, are you saying that folks use a "for in" loop to iterate over the
elements within an array? If so, I'm surprised that anyone would think that a for() loop
over the elements in an array would be the same thigns as looping over the properties of
an object. Or am I misunderstanding the issue?
As I said before to me the namespace problem is less problematic
(although having namespaces preallocated for ${} Form etc...
is not too nice either)
but the basic object altering probably is more critical if you
try to use prototype in a somewhat unknown environment (where you
cannot be sure which lib comes along)
I'm not sure which side of the fence I sit at this time, while I can understand
that library maintainers should practice denfesive coding techniques to prevent
clashes, I can also see that having the flexibility to have base objectys
adorned with commonly needed and very useful methods.
I think I have a bit of reading and thinking ahead of me.
Danilo Celic
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs