[TUHS] long lived programs

Peter Jeremy peter at rulingia.com
Sat Apr 7 07:52:40 AEST 2018

On 2018-Apr-05 22:57:49 -0700, Bakul Shah <bakul at bitblocks.com> wrote:
>Getting back to programming languages, I am not sure case
>distinction really helps. Many of the earlier languages such
>as Algol, PL/I, APL, Pascal, Fortran, Cobol, Lisp didn't have
>it and I don't think it was solely due to an attempt to pack
>more chars in a word.

Early APL implementations do have cases - they use underscored capitals
as a second case (rather like early Unix would use A and \A).  In the
case of APL, I suspect the limiting factor was the number of characters
on a golfball.  Internally, it required 8-bit characters to represent
all the symbols.

>Capitalization can improve legibility in
>written languages but the meaning of a word often doesn't
>change in spite of case change. In modern PLs the meaning can
>be entirely different, and even the category (DO vs do) and I
>am not sure that increases legibility.

Cases (particularly capitalisation) can add meaning - German and English
both use capitalisation as hints (I'm not sure about other languages).
Many programming languages have defacto conventions that use case to
indicate the category of a name (eg constants and macros are all upper
case in C) and Go uses capitalisation to control visibility.

The problem of "DO" vs "do" is no different to "xl" vs "x1" vs "xI" or
"DO" vs "D0" - they are distinct to the compiler but can be confusing to
the reader and are probably better handled via style conventions than
trying to mandate that the compiler makes them equivalent.

>Not to mention the
>camelCaseHorror. Much prefer hyphenated-words

Hyphenated variable names don't work in many programming languages
because "-" is an operator.  The use of camelCase vs underscores tends
to be a language convention.  Whe

Using "case-insensitive, case-preserving" helps in some cases but I
suspect at least some of that is because that is mostly how English
works and therefore English speakers will naturally read "THIS" and
"this" as equivalent.  Someone whose native language is not a latin
script is likely to find having "THIS" and "this" being the same is
quite confusing and an English speaker probably won't instinctively
see "jqvkwrri" and "JQVKWRRI" as identical.  (BTW, DNS is an example
of a case-insensitive, case-preserving service).

Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20180407/340e7861/attachment.sig>

More information about the TUHS mailing list