From: Wayne Blair Date: 2001-06-16T09:56:57+09:00 Subject: [ruby-talk:16522] Re: Smalltalk vs. Ruby >From: "Avi Bryant" > On Sat, 16 Jun 2001, Wayne Blair wrote: > > > Actually I might just take a moment to bring up one of my previous points again. Syntax! > > Kent Beck showed me a very interesting phenominum in one of his books. It's called the rectangle. > > > > self connect: someLocation do: > > [:connection | > > .... > > ... > > ....] > > > > instead of the more C-like structure > > > > self connect: someLocation do: [ > > :connection | > > ... > > ... > > ...] > > > > which leaves an onimous [ hanging out in the middle of no where. Ever since me and my collegues at work saw this [...] visually, we have adopted it. > > It makes things easier on the eyes. I really wish Ruby would let > > me start my blocks on the next line. > > Well, how about > > connect(someLocation) do > |connection| > ... > ... > end > > ? > Sure, but what we're saying is that this is easier to read: connect(someLocation) { |connection| ... } OR connect(someLocation) do |connection| ... end JMHO Wayne