Re: Characters used in programming languages

From: Jonathan Coxhead (jonathan@doves.demon.co.uk)
Date: Mon May 07 2001 - 15:37:45 EDT


   On 7 May 2001, at 11:35, DougEwell2@cs.com wrote:

> Trigraphs
> are still supported in the most modern C and C++ compilers, regardless of the
> platform's character set support, and you have to backslash-escape one of the
> question marks in a literal string that contains "??" if you don't want any
> surprises.

   Also, it has to the second one---the trigraph (recognised as 2 adjacent
question marks and a following character) is processed before backslash has any
special meaning. So, for example, '\??/' is a way of writing '\\', not '??/'.

> Any programming language that wants to avail itself of the rich set of
> punctuation, brackets, and other symbols found in Unicode must have at least
> the following features:

   You write "must" as if you were explaining a physical law that is not open
to interpretation---but both of your points seem to be personal opinion.

> 1. Commonly used symbols *must* be directly available on virtually all
> Latin-script keyboards, not just by typing convoluted dead-key or
> Alt-sequences.

   That may be your preference, but it's by no means a "must" (and certainly
not a "*must*"). Why should a programming language limit itself to symbols that
are only available on Latin script keyboards? The reasons is convenience (for
users with Latin script keyboards), but it is balanced by other factors (such
as legibility and convenience for users without Latin script keyboards) that
may (or may not!) outweigh it in certain situations.

> 2. Symbols must be easy to distinguish from each other, not just in a
> professionally designed font but in ordinary handwriting, to prevent
> confusion.

   Again, who says so? I'd say a langauge that uses PRECEDES as well as LESS-
THAN SIGN (for example) needn't be any worse than a language which uses DIGIT
ZERO as well as LATIN CAPITAL LETTER O. (You could make a good case that C++
would be a better language if it had used LEFT and RIGHT ANGLE BRACKET for
template arguments, rather than recycling LESS- and GREATER-THAN SIGN.)

   Just seeking a little balance ...

        /|
 o o o (_|/
        /|
       (_/



This archive was generated by hypermail 2.1.2 : Fri Jul 06 2001 - 00:18:17 EDT