[self-interest] Re: Grammar changes - comments?
Jecel Assumpcao Jr
jecel at lsi.usp.br
Tue Aug 31 13:30:52 UTC 1999
Steve Dekorte wrote:
> A number of other dynamic scripting languages have also taken up the
> C++ prefix message syntax.
As far as I can tell, this syntax originated with Apple's Object
Pascal (I don't know what Simula looked like). Since the idea was
that objects were extended versions of records, it made sense to
adapt the record field access sytanx for message sending.
Note that a number of easy to use languages don't have this style
of syntax: Logo, HyperScript, Rebol...
In Smalltalk-72 and -74 you could define your own syntax for
message sends and people tried a number of different styles.
When they had to choose a fixed grammer for Smalltalk-76 (in
order to be able to translate to bytecodes), Dan Ingalls looked
at what everybody had been doing and mixed the best ideas into
the grammar that is still with us in Self. This is a very
powerful design method.
> Has anyone considered supporting this syntax in one of the new Self clones?
I think NewtonScript did, though it is an old Self clone.
> It would also make automatic translation of Java(or Python, etc.) code
> to Self code a bit easier.
Not really, unless you can avoid parsing the source language.
Please note that I think syntax doesn't matter - the future of
Self is to be more and more graphical. Outliners, for example,
have eliminated the need to bother with slot declaration syntax
for the most part (though they could do a better job). The
syntax for sending messages to object will probably go the
same way eventually.
More information about the Self-interest