From: Tony Arcieri Date: 2009-05-22T14:33:49+09:00 Subject: Re: Pythonic indentation (or: beating a dead horse) --0016369202cb9f28f7046a799aba Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, May 21, 2009 at 10:27 PM, J Haas wrote: > Okay. But just to recap what's gone before: you've said all along that > Pythonic indentation in Ruby was impossible. It's impossible, because > it's incompatible with blocks. It's impossible, because everything's > an expression. It's impossible, because Guido said so. And I've asked > you over and over for an example demonstrating its impossibility. > You've had time to think it over, you were under no constraints, and > this is what you've come up with. > My claims were it's impossible with a Pythonic lexer and a backing context free grammar. I certainly didn't claim that if you throw enough regexes at the problem it won't go away. > I found the old preprocessor script from awhile ago that I mentioned > earlier in this thread. I've pastebinned it at > http://pastebin.com/m5fee1e92. > It's very short, and pretty simple. I have no doubt that it would need > a lot of work to be robust. (In particular, I think things need to be > added to the enumeration at line 68.) > > But Tony, it blasted through your "impossible" example without > skipping a beat, working perfectly on the first try. > Well great! I'm not really sure how that script works, but cool. However, what you have there is a marked departure from how Python actually works. But if you're happy with it, great. Go for it and see how popular you can make it. -- Tony Arcieri medioh.com --0016369202cb9f28f7046a799aba--