[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yucky proposed | syntax

I certainly agree that the proposed | syntax is yucky.
That a keyword named "foo" (lowercase) would come out |:foo|
instead of :|foo| is very yucky.  Like the "foo#:bar" syntax,
it was intende to be quite grossly yucky.

It is indeed beyond the bounds of reasonable taste to purposely
invent package names with odd characters in them -- at least for
human consumption.  However, time and time again someone has reason
to compute a purposely distasteful thing to be "sure" that no one
will bump into it.  That GENSYM names have leading zeros "G0001"
is an example of this.

Moreover, it will certainly be possible to compute package names.
You can compute an arbitrary string and feed it to MAKE-PACKAGE.
It is important, for debugging reasons if no other, to have a
standard way to print in the resulting bizarre situation.  But it
doesn't have to be a nice way, and indeed should be awful to
discourage such mucking about.

The advantage of my proposal is that it keeps the tokenizing model
very simple.  That's all.  Any other proposal I have seen makes
the model for where you break between tokens very complicated.
(For similar reasons I tend to prefer "foo::bar" to "foo#:bar",
but I also agree with Moon that :: is perhaps not yucky enough.)
It is not intended that it be easy, merely possible, to tell
what |S P A C E S:\:\:=| means.  Anyone who invents a package named
"S P A C E S" or a symbol named "::=" deserves what he gets.

Before non-terminating macro characters were introduced, the tokenizer
was very simple.  Escape characters make things into consituents;
whitespace is ignored; macro characters get executed; and otherwise
gobble constituents until a non-constituent is hit.  Period.
N-T macro characters complicated things only slightly.  The proposed
syntaxes such as |...|:|...| will require a much more complex model
for the sake of some syntactic prettiness in situations that shouldn't
have to be pretty.