From: Gavin Kistner Date: 2004-07-14T12:16:29+09:00 Subject: Re: String.split On Jul 13, 2004, at 5:41 PM, Lloyd Zusman wrote: > This convention was almost certainly adopted deliberately, in order to > be consistent with some of the semantics of Perl's split() function. > Although it may seem counter-intuitive to people without prior Perl > experience, it's a very familiar construct for those who have been > working in Perl for a long time. > > Just think of split(" ") as a special case which performs a very useful > function. Ick. Not at your summary, Lloyd, but at this situation. This is...stupid. I don't know what else to call it. It's a non-sensical idiom, sure to bite more than a few people. It's like Ruby implemented the behavior of a bug that Perl people have gotten used to relying on. What possible benefit is there to typing split(" ") vs. split(/\s/)? One saved character (but two shift key presses!)? It is counter-intuitive to people without prior Perl experience. Now that Ruby is taking off in its own right, does Ruby need to continue supporting gross global $ vars, this, and other ugly Perl-isms just to try and make Ruby feel more like Perl? -- (-, /\ \/ / /\/