From: "S.Volkov" Date: 2007-05-19T17:30:10+09:00 Subject: Re: Why not adopt "Python Style" indentation for Ruby? "Yukihiro Matsumoto" wrote in message news:1179512451.328481.6736.nullmailer@x31.netlab.jp... > Hi, > > In message "Re: Why not adopt "Python Style" indentation for Ruby?" > on Sat, 19 May 2007 03:15:17 +0900, "S.Volkov" > writes: > > |imho: we need special terminator anyway, now it is 'end', could be > another; > |suggestion: introduce ';;' terminator for 'implicit blocks (not started > with > |class/module/def/do/begin), ie: > > For your information, 1.9 once had exact same syntax you've proposed > for a short while. I have a time machine. The idea was abandoned > since it caused serious unreadability. always? may be real cause was abuse of this syntax? well, if suffix did not work, can we try prefix syntax for 'end'-less constructs? (if not has been tried before) suggestion: :& - prefixes 'single statement body' code block in class/module/def/unless/then/else/while/until #- samples if cond :& puts a if cond : puts a else :& puts b while cond :& puts a for var in expr :& puts var # also valid: if cond :& (puts a; puts b) while cond :& begin puts a end #- single statements 'chain' unless cond_a :& for ea in expr :& for eb in ezpr :& if cond(ea, eb) :& do_smthng #- simple functor with local state class< 55 BRs Sergey