From: avi@...4.com (Avi Bryant) Date: 2002-06-07T02:53:06+09:00 Subject: Re: Pascal-like 'with' statement? nobu.nokada@softhome.net wrote in message news:<200206061041.g56AfZf15706@sharui.nakada.kanuma.tochigi.jp>... > Hi, > > At Thu, 6 Jun 2002 17:42:27 +0900, > Avi Bryant wrote: > > Or, in more Smalltalky style, > > > > Cfg = OpenStruct.new.host('localhost'); > > .user('shoujoai'); > > .database('shoujoai'); > > .yourself > > > > One nice property of this last style is that the whole thing becomes a > > single expression, suitable for, say, putting in a return statement > > without even using a local variable. > > It allows only each one methods, i.e., denies method chains in > cascades? If not, it needs to explicit the `start point' of > the cascade. That's right. Actually, it depends on dialect - I think Dolphin has or had support for nested cascades - but in Squeak and most other Smalltalks, once you start a cascade you can't chain methods from that point. This is almost never a restriction you notice, in my experience.