From: Marc Heiler Date: 2008-05-03T08:52:46+09:00 Subject: Re: Ruby 1.9 wishlist > You could do > if true > p :true end > and that's already in the language But in all fairness, this is not the same as he said: > I'm a huge fan of one liners like: > x if y > ... but sometimes it just doesn't fit on one line and you need to do > if x ... end. Needing an extra line for that end really really > sucks. I can understand this partially. If one wants to fit in ~80 chars / line, and even has a few variables that may be a tad longer, or more conditions to check, that line would quickly get quite long, and thus you will naturally end up doing a newline (and then an end). I dont think the end should be on the same line at all. In fact what he seems to have suggested was to completely drop the end in this scenario. This seems to be not possible, but it is simply not the same as putting the end on the same line :) [Not sure if you agree, but I think the end on a newline is easier to read than an end on the same line] FWIW I personally do not mind the newline+end at all. I dont really think it leads to ugly code or code that "sucks". On the other hand though, I would like to have some language that allows this dropping of closing clauses without writing it, but which is also "more ruby than python" (I dont really like the def __foo__(self): stuff ...) It also seems though that most languages out there simply have a really horrible syntax, but maybe ruby spoiled me ... -- Posted via http://www.ruby-forum.com/.