Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsp!johnson From: johnson@uiucdcsp.UUCP Newsgroups: comp.lang.smalltalk Subject: Re: Block variables Message-ID: <80500002@uiucdcsp> Date: Mon, 6-Apr-87 08:48:00 EST Article-I.D.: uiucdcsp.80500002 Posted: Mon Apr 6 08:48:00 1987 Date-Received: Sat, 11-Apr-87 03:51:28 EST References: <2084@mmintl.UUCP> Lines: 13 Nf-ID: #R:mmintl.UUCP:2084:uiucdcsp:80500002:000:496 Nf-From: uiucdcsp.cs.uiuc.edu!johnson Apr 6 07:48:00 1987 Smalltalk-80 defines block arguments the same way. A block argument is really just a temporary variable. In fact, the following method foo [:t| 3] value: 4. ^t not only compiles, it returns 4. This is not a bug in the compiler, though it may well be considered to be a bug in the language. The language was defined this way for performance reasons (evaluating a block does not have to create a new context) but it is definitely counterintuitive. It will probably be changed someday.