> Actually that was exactly what Prototype did when it was young - augment
> Object.prototype. It was removed when Sam was convinced by Dean Edwards that
> it was really a bad thing. No JS library should ever touch Object.prototype;
> search on the web why (if you're interested).
>
> Now these methods are moved to the Object namespace and that's not going to
> change.

Ah, I think I understand. Probably a wise choice now that I think
about it in that context.

Thanks for the clarification.




> Here's an implementation based on the unit test code Mislav mentioned:
>
> Array.prototype.equal = function(array){
>    return (this.length == array.length) &&
>      !this.zip(array).any( function(item){
>        return item[0] != item[1];
>      });
>
> }

Interesting way of doing it. Wouldn't have thought of that. I think
I'll replace my version with that one.

Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to