BCPL in the new millenium (was: Proposal3: Make $_ a valid ..

Mats Nygren nygren at sics.se
Mon Jun 5 18:14:42 UTC 2000


Stephan,

Thanks for the interest, let me also state my intension of a
constructive discussion.

Stephan Rudlof <sr at evolgo.de> wrote:
> Mats,
> 
> I see some problems with and also some useful areas for your approach
> (see below). [snip]
> > Some of that work can be done in reasonable time and will be useful. Note that Squeak is already "bisyntactic" some code can be both in ST-80 syntax and C-syntax.
> 
> This is true, but there is not a bijective mapping between ST and C
> code!
> Slang to C compilation compiles a *simplified* Smalltalk to C.

I wrote "some code" above and Slang is what I meant.
And there is a bijective mapping between (something very similar to)
Slang and C.
I have done that already (most of it).

> [snip] 
> - Communication
> 
> But if we communicate with each other by talking about code snippets -
> e.g. over this mailing list - we should use (IMNSHO) the same
> language/syntax. 

Of course, complete agreement. Use the normal and well established
Squeak-syntax for that. That doesnt stop anyone from
looking at it differently (at home). Just like english is used for
postings. (Well I'm trying at least).

> > Or put in another way, the solution to the Tower of Babel syndrome is to have always bijective mappings between the syntaxes.
> 
> That's a first step, but not sufficient.

Agreed, substitue 'the' => 'a partial'.

> 
> > This will restrain invention but without that bad things will happen.
> 
> That's true! If you take a look into Slang to C translated
> methods/functions you'll see that the C code often isn't very good to
> read (and it needn't!), because C *is* quiet far away from Smalltalk in
> syntax *and* semantics. 

Some more precision. As you say above:
  "compiles a *simplified* Smalltalk to C.".
Except for the inlining and stuff, which is not about syntax (my def of
syntax), that simplified Squeak is quite close to C. As can be seen in
(that part of) the translator, it traverses and writes.
My proposal is to add a little more information to the C output and if
this is done without the optimisations, it is still working C, from
which the Slang code can be recreated. This is within reach. (Of course
the optimisations should be used for the running VM). That way it will be
possible to use squeak as a development environment for (a subset of) C.

> Summary:
> 
> My response should be read as
> - positive, for
> 	- automatic translation of - bijective or not (the latter the normal
> case) - syntaxes/semantics,
> 	- implementing different ST formatting styles;
> - negative, for communication via multiple syntaxes (with the same
> semantics).
As said above, never intended the multiple syntax communication part.

Thanks.

/Mats Nygren





More information about the Squeak-dev mailing list