Blake blake@kingdomrpg.com wrote:
On Thu, 02 Dec 2004 19:05:01 +0800, Yar Hwee Boon hboon@motionobj.com wrote:
caveman light fire with flintAndTinder usingForFuel twigsAndStraw.
Well.. at the very least, "caveman light fire with flintAndTinder usingForFuel twigsAndStraw" is already valid syntax now,
its a chain of
simple message sends, no?
Aha! It was a naive question.<s>
Thanks for bearing with me. I've never gotten used to that construct. Very often in the code it's done with line-breaks, and I think I had attributed significance to those.
You mean something like
caveman light: fire with: flintAndTinder usingForFuel: twigsAndStraw
?
I don't know when it was invented, but Kent Beck's (fantastic!) "Smalltalk Best Practice Pattern" describes it in the Indented Control Flow pattern on page 175.
I've always figured it as analogous to doing this in Delphi:
Caveman.Light(Fire, FlintAndTinder, TwigsAndStraw);
at least where indenting's concerned.
frank
******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent RNID policy. If you are not the intended recipient you are advised that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error please notify the RNID Helpdesk by telephone on: +44 (0) 207 296 8282. The Royal National Institute for Deaf People Registered Office 19*23 Featherstone Street London EC1Y 8SL No. 454169 (England) Registered Charity No. 207720 ********************************************************************
On Thu, 2 Dec 2004 12:42:07 -0000, Frank Shearar Frank.Shearar@rnid.org.uk wrote:
You mean something like
caveman light: fire with: flintAndTinder usingForFuel: twigsAndStraw
?
Yeah, exactly.
I don't know when it was invented, but Kent Beck's (fantastic!) "Smalltalk Best Practice Pattern" describes it in the Indented Control Flow pattern on page 175.
I'll have to check that out.
I've always figured it as analogous to doing this in Delphi:
Caveman.Light(Fire, FlintAndTinder, TwigsAndStraw);
at least where indenting's concerned.
Except, in Delphi, I'd do it this way:
Caveman.Light(Fire, FlintAndTInder, TwigsAndStraw);
I think it's less necessary in Smalltalk, but in more conventional (common?) languages, I favor conservation of vertical space. I believe (and I think studies have backed this up) that if I can see the entire method all at once, I can grasp it much more quickly.
It's one of those things that commends Smalltalk to me, I think, since most methods are relatively short. So much so that you don't need to conserve vertical space.
squeak-dev@lists.squeakfoundation.org