Alternate syntax & example code; color

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Thu Jun 8 16:25:38 UTC 2000


(To be fair, let me just remind you that I've already displayed my bias
against changing the syntax as a help for novices :-)

A fundamental problem with Dan's alternate syntax (that Mats already
mentioned in passing) is that code in comments doesn't work. This may not
sound so bad until you try this in use. Effectively it means that all
example code in comments become more or less useless (unless it spuriously
parses identically in the new syntax). For example, I looked at the
changeset preambles, this one is from 2275:

"From the profiles posted earlier, you could see that

        Interpreter translate: 'interp.c' doInlining: false

spend about 20% in method Symbol class>>intern:.  About 17% of these are
caused by " ...

and "doing" the middle line yields:

        Interpreter  Nothing more expected ->translate: 'interp.c'
doInlining: false
                    ^^^^^^^^^^^^^^^^^^^^^^^^^


Unless you add a special TextStyle annotation for code that re-parses the
text in it automatically (and everyone writing remembers to annotate their
examples with it...), you cannot use any examples--including class side
example categories, written tutorials, and such texts as "Welcome to
Squeak"--which are intended for novices I would guess.

(One short-term remedy would be to prefix all error strings with some type
of notice that the alternate syntax is active.)

-----

And wrt color: Here, less is more than ever ;-)

|
| Typographic guidelines for use of color:
| 
| 1. Don't.
| 2. Goto 1.
|

At the very least, make all windows (ie. text backgrounds) white by default
before enabling this. Red and pink on green, or red and pink on cyan, for
example, whoa! Or pink on pink (Debugger), or anything on orange
(Transcript). Truly psychedelic.

Colored text is generally never a great idea for non-attention-attracting
purposes. Italics and boldface are ok, but then a more calm typeface than
New York ought to be used.

I think the code coloring craze started from a need to organize long text
files of monotonous-looking code. But we already have browsers, so there's
really no need for it. As you may have noticed, well designed web pages
often no longer have text links in deviating color, or use greatly subdued
colors.

Okay, today's complaining quota is filled, but  I tried to be constructive
too.

Henrik






More information about the Squeak-dev mailing list