From: Robert Dober Date: 2007-03-07T18:37:04+09:00 Subject: Re: elseif v. elsif ?? On 3/7/07, Hans Sjunnesson wrote: > On Mar 7, 9:56 am, 7stud 7stud wrote: > > What the?? I just spent two days trying to figure out why I couldn't > > reproduce the example in "Ruby in 20 minutes" and get it to work. After > > examining my code line for line against the example code and not being > > able to detect any error, I was assembling several code examples into a > > text file to post here, when I happened to notice 'elsif'. Why > > didn't Ruby flag 'elseif' as an error? > > > > Does Ruby try differentiate itself in ridiculous ways like that just for > > the sake of being different? And why isn't something like that > > explicitly pointed out in a beginning tutorial? So far, I have to give > > Ruby two thumbs down. > > > > C++, Java, Javascript, php, Servlets+JSP programmer > > > > -- > > Posted viahttp://www.ruby-forum.com/. > > Well, Ruby doesn't try to differentiate itself in ridiculous ways just > for the sake of being different. It's not a person. > However, it will spit out a "undefined method 'elseif' for main:Object > (NoMethodError)" when you use 'elseif', so it's really not a problem > is it? > > -- > Hans > > > No of course it is not :) I think to understand the frustration of OP however. He is probably coming from a completely different world and it is not always easy to grasp new concepts. Therefore I preferred to ignore the aggressive nature of the post ;). He might even have a point when he says that this is maybe not really well documented, With this I do not mean the "elseif" of course but just the dynamic evaluation of the code. Maybe a chapter for that kind of pitfalls could be added somewhere - well it probably is already, maybe somebody can indicate that. This is however not a clearcut thing as it might seem at first view. Robert -- We have not succeeded in answering all of our questions. In fact, in some ways, we are more confused than ever. But we feel we are confused on a higher level and about more important things. -Anonymous