It is a direct consequence of Array being an extension of Object.  An
alternative view is that Array should have all the properties (either
inferred or explit) of Object, in addition to those provided by
Array.prototype.

But if you create an Array, and then "for/in" through it's "Object properties"... what's the point of even instantiating an Array? Why not just use an Object if you are not using the collection specific methods and features of the Array object? And if you've issues with the sugar, why use it? I'm not saying you necessarily are one of these people, but we don't really need another guy to come into the prototype/scriptaculous list to tell us why we shouldn't use prototype/scriptaculous. We already know what the sugar does, it's sweet and good and we like it. I've never had an issue with for/in because i don't use it with an Array, I use the array functions of the Array object or I use an Object or a custom Hash class when i need an associative array or robust dictionary features. ...but, that's just me... and my opinion :-)

--~--~---------~--~----~------------~-------~--~----~
 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