BCPL in the new millenium (was: Proposal3: Make $_ a valid ..
Stephan Rudlof
sr at evolgo.de
Mon Jun 5 02:26:06 UTC 2000
Mats,
I see some problems with and also some useful areas for your approach
(see below).
Mats Nygren wrote:
>
> Alan Kay <Alan.Kay at disney.com> wrote:
> > [about BCPL]
> > [about ST-72/76/80]
> > This was a really good idea for a while, but started to degenerate
> > into a Tower of Babel via poor choices for syntactic forms in the heat of
> > programming (even by good programmers).
> > Smalltalk-76 (by Dan) was a really interesting meeting ground between
> > a compilable and a readable syntax. Smalltalk-80's syntax (I believe) could
> > have adopted a stronger theory of uniformity that would have yielded more
> > pleasing results (I don't like it).
> > I still like the idea of easy syntactic extension (and most of the
> > possible routes to metaprogramming), but experience seems to say that
> > "making it easy" should not generally be the same as "put it at the same
> > level of expression". There should be "fences" that you have to jump over
> > to do the metaprogramming, but once jumped, the metaprogramming should be
> > easy and not obscure .... (Squeak needs a LOT OF WORK to be in accord with
> > this principle.)
>
> I have made several postings now, the latest entitled "Syntax & Sematics
> <etc>", on a similar theme. I have done some work on programming
> language syntaxes (unpublished) and I'm porting this to Squeak now. It
> will take some time, but sometime this year, in august lets say,
> results should exist. What I hope is that some people in this list will
> support the project as it will be an isolated add-on otherwise. To be
> the real thing it should be deeply integrated in the system. I believe
> that I know how to do this, and I agree a LOT OF WORK is needed, the one
> important thing however is what the list wants. I volunteer for part of this work. It is well in line with my research interests and if supported by this forum, the work will be a pleasure.
>
> 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.
> The C-parser is missing but easy to incorporate. The general structure for this is also missing and more difficult but not impossible to incorporate.
>
> As for the Tower of Babel syndrom, the way I have in mind is that the
> reader of code have a say on how it will loook, not only the writer of
> it. I might for instance prefer another syntax than the present and it
> will then be possible to look at it entirely within this other syntax.
> There is no Tower of Babel arising from that. It remains one syntax.
I want to make some refinements here, please take it as thoughts to push
a *constructive* discussion.
- Automatically translation
This seems to be an interesting area for your approach.
For automatically translation from one - bijective, or not - syntax to
another, we don't have a Tower of Babel problem.
- 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.
If we'd use different - just take bijective - syntaxes, every reader of
a code snipped has to translate it by the - to be written - Squeak
translater into his/her favorite syntax, to have a comfortable reading.
To give an example: It's like getting a mail in a foreign language and
to have to translate it into your [mother/known foreign] language,
before you are able to start to think about the semantics of this mail.
I don't say that it isn't possible to solve these problems, but this is
expensive, we'd need e.g.:
- an automatic working translater of code snippets integrated into
Celeste and Scamper,
- all would have to use mail clients and browsers, which have this
functionality.
Otherwise there would be a Tower of Babel problem!
> 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.
> 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. The 'emacs'-like ('eierlegende Wollmilchsau' in
German) translator has principle limitations, but you know that.
>
> It will look somewhat like this:
>
> A B C
> \ | /
> S
> / | \
> X Y Z
>
> Where A, B, C signifies different syntaxes, S is the common ground, a
> tree structure, X, Y, Z is implementation techniques for different
> machines. In sum total people with different habits of syntaxes can use
> Squeak on different machines. Such a system can also translate A <-> B <-> C via S
That's possible. But e.g. it's *not* possible to generate an (objective)
C like syntax from ST, which isn't likely to be mixed up with real
(objective) C by the reader (what - regarding semantics - it isn't!).
Just think of numerics of LargeIntegers... ;-)
>
> Chris Reuter <cgreuter at calum.csclub.uwaterloo.ca>
> made a postings entitled
> "Re: Proposal4: Show := on fileout / pretty print"
> that is in this direction too.
> He writes only of writing. It is important to connect reading and writing, whatever is writable should be readable, then the users gets the liberty to choose.
>
> I sincerely hope that some positive response to this will appear.
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).
Greetings,
Stephan
>
> /Mats Nygren
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
More information about the Squeak-dev
mailing list
|