tobie wrote:
> Rob,
>
> Using a for...in loop on an Array is bad practice / plain wrong (c.f.

You ignored the bulk of my post - I'll keep it simple.

If a library adds properties to built-in objects, it should ensure that
anyone using that library is aware of the extra properties and allows
for them where necessary.  A library that doesn't extend built-in
objects doesn't have that problem.


> Seriously, I don't see how you can call that a shortcomings of
> Prototype.

You can regard it as a shortcoming or a feature, that point is moot.

What you do have to acknowledge is that it is a fact and that users
should be aware of it.  When someone says "Oh, but library X extends
Array, String, etc." you say yes, with these properties... and we deal
with that like this... then it's up to the questioner to make up their
mind whether to continue with the library or not.


-- 
Rob


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to