From: Shannon Fang Date: 2002-12-05T09:11:38+09:00 Subject: Re: elseif? Well easy to learn and easy to read is most important reason I like ruby. That's why I am hypersensitive about the funny symbols. I would again express my thanks to Gavin, and all rubyists here to help me understand funny symbols and Symbol class. I don't think you should attribute regex to perl. I love regex, but it is not a perl thing. I use grep and vim... all support regex. About other stuff like $_ $! $` .... I *hate* them. Probably using english.rb is better? Shannon On Thu, 5 Dec 2002 08:50:55 +0900 Iain 'Spoon' Truskett wrote: > * Shannon Fang (xrfang@hotmail.com) [05 Dec 2002 10:39]: > > * Iain wrote: > [ snip regarding where 'elsif' came from ] > > > It's spelt that way in Perl. Not sure if Perl nicked it from > > > anywhere. Most shells seem to use 'elif'. > > > It's a bad thing to inherit or borrow... > > Why? Ruby has borrowed many perlisms. Just look at the regex support and > surrounding variables =) > > Half of the attractiveness of Ruby to me is that it's much like Perl, > but easier and with less typing. > > > Since ruby support both && and || or, why not support both elsif and > > elseif? Just a suggestion > > Perl also supports '&&' and 'and', and '||' and 'or'. I imagine that's > also where Matz borrowed those =) > > The thing to note about those is that they have different precedence. > '&&' is not directly synonymous with 'and'. 'and' has ultra-low > precedence, thus obviating the need for parentheses in many cases. > > Having elsif/elif/elseif/'else if' all be the same would be somewhat > pointless. > > Mind you, I'm still somewhat irritated that Proc and def are so > dissimilar to each other. But I'll live =) > > > cheers, > -- > Iain.