Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!hp-pcd!hp-cv!reuter.cse.ogi.edu!qiclab.scn.rain.com!slc.com!servio!servio!aland
From: aland@servio.slc.com (Alan Darlington)
Subject: Use of Blocks (was Re: Why do you hate C++ ?)
Message-ID: <1995Dec29.190420.17791@slc.com>
Sender: news@slc.com (USENET News)
Nntp-Posting-Host: servio
Organization: GemStone Systems, Inc., Beaverton OR, USA
References: <DK5Mtx.EyH@marble.com> <owen-2812951126230001@rowen2.astro.washington.edu>
Date: Fri, 29 Dec 1995 19:04:20 GMT
Lines: 17

owen@astro.washington.edu (Russell E. Owen) writes:
<snip> 
> ... and (I can
> dream) a cleaner non-block-oriented means of control flow. (Blocks have
> their place, but seem needlessly clumsy for if/then, etc.).

Agreed.  This is why most Smalltalks generate in-line code for common
simple block constructs.  This improves performance, but you cannot
override these methods with your own code!  :-)

One interesting side-effect is the warning you get (at least on some
Smalltalk versions) when you use an object instead of a block
declaration (i.e. "test ifTrue: aTrueBlock." instead of
"test ifTrue: [aTrueBlock value].".

  Cheers,
  Alan
