Sake = Rake for Smalltalk?

Damien Pollet damien.pollet at gmail.com
Mon May 15 18:38:07 UTC 2006


On 4/27/06, stéphane ducasse <ducasse at iam.unibe.ch> wrote:
> > Anyway I think that would be nice to make something to run St scripts
> > from the command line... just to attract users from Python/Perl/(put
> > your classic text file scripting language here) to Squeak.
>
> exactly and also me when I have to write some script shells, and I
> would prefer to write
> some sqrit-shell :)

> ColoredPoint>>foo: zork
>         <category: 'foobar'>
>         <author: 'sd' date: '24/06/2006'>

I'd like to unify method bodies and blocks:

ColoredPoint >> [ foo:aFoo bar:aBar |
    self doStuff.
]

This way, >> is really a message with a block argument, and one could do:

aBlock := [ foo:aFoo bar:aBar | self blah ].
aBlock foo:42 bar:51.
Maybe #foo:bar: should just be an alias for #value:value in this
precise instance of Block, instead of defining a new method in Block.

The current syntax ("anonymous" blocks) could still be allowed as
syntactic shortcut:
aBlock := [ :x :y | self blah ].
being synonymous for:
aBlock := [ value:x value:y | self blah ].


Also, what should self be in the context of a script ?  In a (VW)
workspace it's an undefined object...

-- 
 Damien Pollet
 type less, do more


More information about the Squeak-dev mailing list