dnew at san.rr.com (Darren New) wrote (abridged): > It's been too long since I used Smalltalk, but doesn't |f| inside a > smalltalk block declare a block-local temporary, rather than an > argument? I > thought it was something like > > [ f: g: |q r| code goes here ] > that says "f" and "g" are arguments, q and r are temps? Close. There's an extra bar and the colons go the other side of the variables. [ : f : g | |q r| code goes here] It as if there were an invisible message selector keywords before the arguments. Compare with method definitions: with: f and: g |q r| code goes here the "with" and "and" are part of the method's name, so the block is like an anonymous method. > If I'm remembering right, I'd say it's a minor faux pas to use syntax > from Smalltalk and have it mean something subtly different. Well, it's not like this part of Smalltalk is ideal. Dave Harris, Nottingham, UK | "Weave a circle round him thrice, brangdon at cix.co.uk | And close your eyes with holy dread, | For he on honey dew hath fed http://www.bhresearch.co.uk/ | And drunk the milk of Paradise."
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4