Roland a écrit :
> Why does Object.extend() dont extend nested keys/values...

Because deep copy is not the general need, I guess.  I, for one, never 
need it, and apparently the other members of Prototype Core don't need 
it much, either.

Personally, I also find deep copy in the JS world can often be 
"dangerous" to unsuspecting developers, in that many use cases could 
yield major slowdowns or turn out infeasible (e.g. props referencing DOM 
nodes or native JS objects that don't take kindly to being cloned, etc.).

However, do note that if you absolutely need deep copy, you can pretty 
easily monkeypatch the library with a *wrap* call.

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

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