[ENH] Display := when pretty printing ( [sm][et][er][cd][approved] )

Peter van Rooijen squeak at vanrooijen.com
Thu Oct 16 15:18:38 UTC 2003


From: "Richard A. O'Keefe" <ok at cs.otago.ac.nz>

[major snip]

> The ANSI Smalltalk standard is flawed in a number of ways.  It looks as
> though nobody bothered to do any proof-reading at all.  It is sloppy; it
> looks as though very little thought went into corner cases.  It is verbose
> and occasionally vague, suffering from the ills common to informal
> specifications.  And it leaves a lot out.

Sure, it has problems. But not so many that it can't be extremely useful
anyway. Most dialects can easily implement it to such an extent that an
important measure of convergence can be achieved, without breaking any
significant amount of existing code. So I think it is a very reasonable
strategy when you manage a dialect to try and make it ANSI compliant where
you can.

> BUT it is the only standard we have, and the Smalltalk community is not
> so large that building artificial barriers is a good idea.

Exactly. We need the opposite, we need to tear down barriers. I strongly
believe that barriers that prevent code from traveling from one dialect to
another are among the one that hurt the communities the most.

> The ANSI Smalltalk standard says that "_" is a character that is usable
> in identifiers.  I think this is a Good Thing and I would like Squeak to
> support it.

That is a very good example. Squeak could easily support it. Why it is not
done? I don't know.

Perhaps someone in the group can explain why underscores are not allowed in
identifiers?

> The idea of putting space between words to make text much
> more readable was discovered about 500 years ago.  It's time Squeak caught
up.

Although I don't don't disagree with that way of thinking, the fact that the
underscore in identifiers is supported in the other dialects, and that we
*will* find code there that we can't use in Squeak now (without modifying
the scanner) because of it, is to me a much stronger argument.

Over the years, the dialects have been opening up their source. More and
more, code can legally be reused across dialects. Many authors and even
vendors are now releasing useful code under conditions that allow porting to
other dialects. Isn't there something to be said for making sure we aren't
keeping technical barriers in place that prevent us from this type of reuse
after all?

> Note, by the way, that ":=" is incompatible with mathematical usage.

'Incompatible'? In which way is it incompatible with that? Perhaps you
simply mean 'different'?

> In mathematics "x := y" doesn't mean "change x to have y as value",

It doesn't mean that in Smalltalk either.

> it means "define x to be y all the time".

> - Third my goal is that Smalltalk or any new
> Smalltalk-based-better system grows and get more programmers.
>
> Good.  We share that goal.  This is one reason why ANSI compatibility
> is important.  This is one reason why a book should use the ANSI symbols.
>
> Now if I want to attract programmers of other languages:  I do
> not know any mainstream language (I'm certainly wrong here again
> I'm not expert but just an experienced promotor of Smalltalk)
> that does not have an ASCII basis

I am thinking back to what ASCII stands for, American Standard Code for
Information Interchange (at keast, that's what they told me in school it
stands for). To me it says that where you want to achieve Information
Interchange, it is a good idea to have a Standard Code.

I might add to that the more you want Information Interchange, the more you
probably want a Standard Code.

And conversely, if Information Interchange isn't high on your list of goals,
then why bother using a Standard Code?

[snip]

Cheers,

Peter van Rooijen
Amsterdam



More information about the Squeak-dev mailing list