From: David Vallner Date: 2006-02-05T22:59:53+09:00 Subject: Re: Indentation vs. "end"s Intriguing idea, but completely ad-hoc, and potentially confusing and unreadable. Especially if someone were to apply it with the "Few small classes per method" style of programming, or any similar meta contexts. What exactly would the ``<'' close then? The innermost or the outermost class? What about a module used as a namespace containing several spaces classes in a single source file? A magic "end almost everything for given values of almost everything" would be just repeating the constant lookup issue all over again. Not necessarily a problem to bite you in the majority of cases, but another bit of syntax most people can't really remember how it really works. I might also be horribly, horribly wrong. In that case, ignore me as usual. David Vallner Dňa Sobota 04 Február 2006 08:13 Luke Duncalfe napísal: > Hi, > > I'm not the most experienced Ruby user, but for what it's worth one of the > reasons I chose to program in Ruby is because the language looked, to me, > so damn nice. I'm an artist who works as a programmer, so flaky reasons > like the aesthetics of the code were very important to me in deciding to > take Ruby on. > > I don't really like the idea of ;; because to me it breaks the beauty of > Ruby code. But I do like the idea of have symbols replace an 'end'. My take > on a nicer symbol to use would be '<', it's like pointing back to the > margin saying 'go home now'. Except, any multiple symbol would, I think, > not really help to clarify the code, and would instead just be quicker to > type than 'end'. How about having one symbol, which basically would end all > nested functions and conditionals, except not close the class. > > So working with Matz's example, it would look like this: > > class Foo > def bar(a) > p a > < > end > > Or, with more nesting > > class Foo > def bar(a) > if (a) > p a > < > end > > So, without a class, code could look like this: > > if (a) > if (b) > if (c) > if (d) > p e > < > > > ? > > Luke > > "Yukihiro Matsumoto" wrote in message > news:1138877284.580712.22693.nullmailer@x31.priv.netlab.jp... >