[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-30 Thread Sylvain ZIMMER
Thanks Andrew. As I said, I just posted because I wondered because it wasn't included, no need to take it as a feature request ;-) I'm also interested on other insights from Core :) cheers On Sep 30, 9:03 am, Andrew Dupont [EMAIL PROTECTED] wrote: The size method comes from Enumerable#size.

[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-29 Thread Jeff Watkins
Er, sorry, the smart-ass in me got the best of me. I think Prototype is in danger of starting to bloat like other libraries and I think requests like this are exactly why. There's no possible reason to have a size method when there's a perfectly good length property. I'm certain someone

[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-29 Thread Sylvain ZIMMER
Well I was validating data elements and I just had to do something like : if ((typeof data)==string) size=data.length else size=data.size() which seems quite counter-intuitive, maybe violating the http://en.wikipedia.org/wiki/Principle_of_least_surprise I don't take the prototypejs.org

[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-29 Thread Jeff Watkins
A lot of 50 byte features and you have enormous files. On Sep 29, 2007, at 6:08 PM, Sylvain ZIMMER wrote: Well I was validating data elements and I just had to do something like : if ((typeof data)==string) size=data.length else size=data.size() which seems quite counter-intuitive,

[Prototype-core] Re: Any reasons for not including String#size ?

2007-09-29 Thread jdalton
I am a bit confused... what would size provide on other objects?? Also what is to stop you from adding the 50 bytes to your own code? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post