From: Daniel Carrera Date: 2003-08-18T07:29:48+09:00 Subject: Re: Wish: Python-style indenting On Mon, Aug 18, 2003 at 07:19:22AM +0900, Jonathan Aquino wrote: > I wish Ruby had Python's use of whitespace to indicate blocks. Then I > wouldn't see all these lines that simply say "end" or "}". > > Jon I rather prefer having a clear delimiter like "end". I don't like Pytnon's method. It looks like blocks are just "dangling". I think that "end" adds readability. I like "end" better than "}", so that's a plus for Ruby in my book. Even when I write blocks, I use do...end instead of {...} (except for one-liners). I also like flexible syntax: 1. iterator { some block } 2. puts "hello" if condition 3. def twice() yield; yield; end These are lost by Python's syntax. I think that flexibility is worth the price of an "end". But then again, I also think that "end" is a good thing on itself. Though I guess you can argue that Python does support the "end" feature if you want: if (condition): #do print "He he he" #end :-) -- Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88 .-"~~~"-. On the menu of a Swiss restaurant: / O O \ "Our wines leave you nothing to hope for" : s : \ \___/ / Sign outside a Hong Kong tailor shop: `-.___.-' "Ladies may have a fit upstairs"