f-script

Marcel Weiher marcel at metaobject.com
Tue Nov 20 13:18:16 UTC 2001


On Tuesday, November 20, 2001, at 07:07 AM, Greg A. Woods wrote:

> [ On Monday, November 19, 2001 at 17:31:46 (-0800), Tim Rowledge 
> wrote: ]
>> Subject: RE: f-script
>>
>> woods at weird.com (Greg A. Woods) is widely believed to have written:
>>>
>>> In Smalltalk syntax one of the problems with symbols like you suggest,
>>> or any new keywords that look like words, is that they're much more
>>> easily confused with message selectors or variable names, etc.
>>
>> But, but, they _are_ message selectors!
>
> Ah, no, I don't believe they are, at least not in F-script proper.

Yes and no.

>  They are more like meta-modifiers to message selectors.

Yes, they act as modifiers to messages, meaning they act on a meta-level 
compared to meta-messaging.  No, this doesn't mean they can't be 
messages as well in a reflective language:  see Higher Order Messages 
(in fact, HOM is referenced in Phillipe's paper).  In fact, one could 
say that F-Script propagation patterns are a very specific and very 
highly developed form of HOM.

> Whether it makes sense to implement them as normal message selectors in
> another Smalltalk is perhaps the question I'm asking.

It does, and not just in Smalltalk.


>> Mixing operators with message sending is a recipe for confusion. :-(
>
> That's the problem though -- as identified in Mougin's paper, there's no
> way to get the full power of array programming into a Smalltalk-like
> syntax without extending the message sending paradigm to allow for the
> sending of a complex group of messages using a simple, compact, and
> transparent syntax.  To quote from the paper:
>
> 	[5.3.2] When the  "@" symbol is placed after the message
> 	recipient and/or just before the arguments, it means that a loop
> 	on [the] designated arrays must be run in order to generate
> 	message sends.
>
> We're not talking about simple message selectors here, but a kind of
> meta-modifier of message selectors!

someCollection do someMessage: someObject.
someCollection do someMEssage: someOtherCollection each.

This is quite doable without special syntax, although I do agree that 
the special syntax does have its advantages, signaling very clearly that 
something special is going on.  On the other hand, 'specialness' is 
really not a constant factor, as people become used to new things, it 
may actually make more sense to have this as just another message 
selector whose semantics have to be known, just like any other.

> It would appear that F-script is not just an interesting extension
> proposal to Smalltalk, but also a practical demonstration of a working
> language that's capable of doing things that are much harder to do in
> plain Smalltalk.

Sort of.. ;-)   I do agree that the higher order messaging concept 
allows for very expressive programming, and f-script's propagation 
patterns are an excellent implementation of one particular form of 
higher order messaging focused on array processing.  However, I also 
think that all of this can be expressed quite well within the framework 
of Smalltalk, although a rethink of some coding practices/patterns might 
be necessary.

Marcel

--
Marcel Weiher				Metaobject Software Technologies
marcel at metaobject.com		www.metaobject.com
Metaprogramming for the Graphic Arts.   HOM, IDEAs, MetaAd etc.





More information about the Squeak-dev mailing list