Compiler, was Re: Block closures

Mats Nygren nygren at sics.se
Fri Jul 28 00:13:56 UTC 2000


Dan Ingalls <Dan.Ingalls at disney.com> wrote:
> Mats Nygren <nygren at sics.se> wrote:
> [snip]
> [about Visitor in compiler]
> Yes, and you could probably clean up printing this way.

I've already begun that and can see the end of it. Thats what got me
into this, I figured since I was looking a little at the compiler I might
as well do this. You'll see the printing stuff in August/September,
I hope you'll like it.

There is (at least) two important open question:

1) How to handle #storeOn:. It should be in the same syntax as everything else.

Right now any old object can write any character directly, that will never
make it to a system where the user can choose between different syntaxes.
I have some structure on this but it needs to be worked out in detail for
Squeak. In short let it be possible for all objects to be created from somehting
{}-like. For example "Point { 2. 4 }" or "Point value: { 2. 4 }". One or a few
abstract schemes like that. (And some special cases defined by class and syntax
together .. 2 @ 4 is ok just as long as not every class has sme special trick)
Then this can be done indirectly and use the ordinary possibility
of writing a syntactic structure with "pluggable" syntax. This demands of all
syntaxes that something like that is available. That is reasonable. So a kind
of limited protocol for the objects is called for. This is reasonable to, why should
Array know about the notation (ascii codes, is comma used, what parentheses
if any are used, ..). This approach should for example be able to make #storeOn:
produce xml the buzz-acronym of the week/month/year/.. In short any object
should be able to serialize in a humanreadable form of the users choice.

2) How to handle the scope of the syntax preference. If it (the serialized object)
is going outside of the users preferences it should use the standard syntax. (Or
some other syntax, the preferred syntax of the receiver)
How do we know where the users preference ends?
at least as big as image?
possibly bigger, local fileOuts
possibly smaller, could want different syntaxes for different parts of the systems,
projects?

Well, some thinking is necessary here. Not completely unlike some other issues,
how to get binary data to work in another image.

I have left these difficulties for the future (or others or both).

> [snip]
> The Parser ..
> 
> This sounds good too.
> 
> 	- Dan

Thanks for the encouragement.

/Mats





More information about the Squeak-dev mailing list