(f value: n) <=> f{n}
Mats Nygren
nygren at sics.se
Sun Jul 9 17:53:36 UTC 2000
Marcel Weiher <marcel at metaobject.com> wrote:
> [snip]>That was my first thought as well.[snip]
We seem to be thinking in similar orbits, should be interesting to
continue this.
> > Some example uses:
> > with appropriate definitions of valueWithArguments::
> > "#at: == #value: for arrays"
> > the rest are for guessing
>
> ?
Sloppy writing, forget it.
> [snip]
> Strictly speaking, yes, but not really. Syntactically, it will look
> (largely) the same, unlike a major expansion into functional
> programming. Also, semantically, ST-80 will be fully embedded in the
> new language, and probably by >90% of its uses. The others will
> mostly be more convenient notation for stuff that could have been
> done in a more roundabout way ( #value:, #perform:). At least at
> first.
I meant in particular the new possibilities that arises. That will make
it possible to write in entirely different ways even within the same
syntax. In that sense it is a new game to play.
>> Can you give me some pointers to the trampoline stuff? I know there are
>> postings on this but I never found them in the archives.
>
>There are some details below, do you want to see code?
I would like to see code, and also if you have some explanation of the
general ideas, probably others will have an interest in that. Perhaps
you have some old Squeak-list thread?
> > Or perhaps I misunderstood, is 'doSomething' a symbol or any code?
>
> Just a symbol.
Then
myCollection do: [ :each | each doSomething ].
can be written
myCollection do: #doSomething.
which is ok to my standards. But it seems you can handle nested loops in
elegant ways, I havn't really understood your framework yet.
To me it seems like you are currying functions, in particular the
Collection-traversals. If you are familiar with the
"lambda-calculus/combinatory logic"-terminology it would be interesting to read
a description of this in such terms.
Is it possible to have your way of doing things alongside the established way
controlled by metaobjects, as in CLOS? (By making a specical generic function class
with its own way of application)
Anyhow my guess is you are doing things similar to ideas I have been
experimenting with outside of Squeak. After my vacation it should be fun
to get into this.
/Mats
More information about the Squeak-dev
mailing list
|