[Top][All Lists]

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

Re: Upcoming loss of usability of Emacs source files and Emacs.

From: Stephen J. Turnbull
Subject: Re: Upcoming loss of usability of Emacs source files and Emacs.
Date: Wed, 17 Jun 2015 16:17:17 +0900

Emanuel Berg writes:

 > But when it is computers, it is English,

True.  There is very good reason to agree on one language to draw
keywords from[1], and similarly for one encoding for characters.  The
choice of English is due to backward compatibility, however -- if we
had chosen a Han language, all keywords and variables could be single
characters, removing the lexing problem from program analysis and
allowing some operation to be denoted implicitly by juxtaposition.[2]
(I don't know if that would be a good change, but it would be an
interesting experiment.  It's pretty much foreclosed for the next
several decades -- Chinese programmers and teachers of programmers,
who are used to English-derived programming languages, would resist
such a change, too!)

 > and it is ASCII,

This restriction, however, has only one justification, and that is
backward compatibility with systems incompetent to display non-ASCII
Unicode, and with humans who prefer not to learn the new conventions
and configure their systems to deal with them conveniently.  One of
the great ideas in Lisp was that parentheses would be the *only*
syntax.  Parentheses are asymmetric delimiters, making Lisp
exceedingly easy and efficient to parse, even from "inside" an
expression.  Then we add comments (with asymmetric delimiters, ";" and
"\n") which are similarly easy to deal with, and then strings -- and
there goes the neighborhood, because it's not possible to determine
which side of '"' is inside and which outside without parsing the
whole program *and* assuming the prefix is well-formed.

The world would be a better place if strings were delimited
asymmetrically.  With Unicode we can do that, and we could also make
some usages (such as the convention for displaying literal symbols in
documentation) prettier.  Since Emacs Lisp is a language that observes,
but does not promise to conform to, external standards, it *could* be a
leader here.

We (and our Lisp parsers) have already learned to deal with the
restriction to ASCII and several instances of symmetric delimiters, so
it's not a big improvement for us, but we would find it useful when
grepping, for example.  I suspect newbies would find it even more
useful, increasing readability.

 > To encourage computer-computer usage in other
 > languages seems to be tolerant and open-minded but it
 > boils down to doing a disfavor.

No, computer-computer usage uses *many* different languages, and we
invent new ones every day (usually called "protocols" in this
context).  It's computer-human usage that demands a single language.

[1]  And in fact for long-lived programs the same arguments apply to
docstrings and internal comments!  (And to some extent, developer
documentation in general, although it makes more sense to translate
manuals than internal documentation.)

[2]  Haskell and SmallTalk already do this to a great extent, of

reply via email to

[Prev in Thread] Current Thread [Next in Thread]