[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-29 Thread Viktor Kojouharov



On Nov 28, 7:07 pm, Mislav Marohnić [EMAIL PROTECTED]
wrote:
 On Nov 28, 2007 4:54 PM, Viktor Kojouharov [EMAIL PROTECTED] wrote:



  If a function can take an argument, and you'd expect to get a boolean in
  some cases, but an object in others, what would you do?

 In my opinion, a function that returns booleans in some cases and objects in
 others is a poor designed function.

 I must agree with Andrew on both his points.

Backwards compatibility. And yes, that in itself means it's poorly
designed, but what you gonna do. And usually the problem is what it
takes, rather than what it returns.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-28 Thread Mislav Marohnić
On Nov 28, 2007 4:54 PM, Viktor Kojouharov [EMAIL PROTECTED] wrote:


 If a function can take an argument, and you'd expect to get a boolean in
 some cases, but an object in others, what would you do?


In my opinion, a function that returns booleans in some cases and objects in
others is a poor designed function.

I must agree with Andrew on both his points.

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



[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-28 Thread Mislav Marohnić
On Nov 28, 2007 6:07 PM, Mislav Marohnić [EMAIL PROTECTED] wrote:


 In my opinion, a function that returns booleans in some cases and objects
 in others is a poor designed function.


Oops, I meant to say poorly* designed function.

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



[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-26 Thread Viktor Kojouharov

I must've missed this one. The second patch still stands though.

On Nov 26, 1:00 am, Sam Stephenson [EMAIL PROTECTED] wrote:
 On Nov 24, 2007, at 11:32 AM, Viktor Kojouharov wrote:

  I've submitted a patch to trac for your consideration, which adds
  array slices a' la Ruby
 http://dev.rubyonrails.org/ticket/10268

 Array objects in JavaScript already have a method called 
 slice:http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Gl...

 -sam

  smime.p7s
 3KDownload
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[Prototype-core] Re: Array slices and Object.isObject|isBoolean

2007-11-25 Thread Sam Stephenson

On Nov 24, 2007, at 11:32 AM, Viktor Kojouharov wrote:


I've submitted a patch to trac for your consideration, which adds
array slices a' la Ruby
http://dev.rubyonrails.org/ticket/10268


Array objects in JavaScript already have a method called slice: 
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:slice

-sam



smime.p7s
Description: S/MIME cryptographic signature