[squeak-dev] So here is my new wild idea

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] So here is my new wild idea

David Zmick
Rewriting the Squeak syntax with OMeta.  Its not that I don't like the squeak syntax, but, think of a language with multiple syntaxes!  If you wrote a syntax for a different language in smalltalk, you could port applications to and from smalltalk more easily, in theory.
This is what I have.

The new Syntax class:
NewSyntax>>messageSyntax ::= <tsString>:o<space>$(<tsString>:m$) => [Transcript show: 'Message: ', m, ' was sent to: ', o]


Executed in a Workspace:
stringToMatch := '''OMeta'' (''subclass: #E'')'.
(E on: stringToMatch readStream) apply: #messageSynatax.
Transcript cr.

This doesn't do anything, but it could.  the syntaxt this creates is like this:
'Object' ('message')
The quotes are required, and I dont think you can send more than one message at once, but this could be an example:
'Object' ('subclass: #HelloOMeta')

just a thought.
dz

--
David Zmick
/dz0004455\
http://dz0004455.googlepages.com
http://dz0004455.blogspot.com