[Prototype-core] Re: Safe Object.extend?

2009-01-09 Thread joe t.
Yeah, good point. i thought specifying the boolean might be more reliable, but it doesn't hurt to leave it out. -joe t. On Jan 9, 8:05 am, evolutional t.ziegelbec...@gmail.com wrote: another thing... I recently used the Object.extend for the default options of a class. So I just thought

[Prototype-core] Re: Safe Object.extend?

2009-01-09 Thread Tobie Langel
That's obviously not possible, for obvious backwards compatibility issues. Best, Tobie On Jan 9, 2:05 pm, evolutional t.ziegelbec...@gmail.com wrote: another thing... I recently used the Object.extend for the default options of a class. So I just thought would it not be simpler to use an

[Prototype-core] Re: Safe Object.extend?

2009-01-08 Thread kangax
On Jan 7, 9:45 am, joe t. thooke...@gmail.com wrote: How would the core feel about a safe version of Object.extend? Object.extend = function(destination, source, safe) {   safe = !!safe || false; You don't really need this conversion - `` (the one that's in the loop) already does it

[Prototype-core] Re: Safe Object.extend?

2009-01-07 Thread Tobie Langel
http://gist.github.com/44308 I'd probably suggest another method, though, rather than adding a flag to Object.extend. Best, Tobie On Jan 7, 3:45 pm, joe t. thooke...@gmail.com wrote: How would the core feel about a safe version of Object.extend? Object.extend = function(destination,