From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter@rulingia.com (Peter Jeremy) Date: Sat, 7 Apr 2018 07:52:40 +1000 Subject: [TUHS] long lived programs In-Reply-To: <20180406055756.A6927156E510@mail.bitblocks.com> References: <1522962186.9871.for-standards-violators@oclsc.org> <3D0656AE-2164-468B-8C98-578F8B2F16EA@bitblocks.com> <1522980220.3263789.1328338032.3CD6D7F7@webmail.messagingengine.com> <20180406055756.A6927156E510@mail.bitblocks.com> Message-ID: <20180406215240.GA57101@server.rulingia.com> On 2018-Apr-05 22:57:49 -0700, Bakul Shah 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: