Case insensitivity and non-English languages 
Author Message
 Case insensitivity and non-English languages

In all this discussion of case sensitivity, there's one issue I'm surprised
nobody has brought up.  That is, what should case insensitivity mean
in other languages?  Now, granted, Scheme is in some sense defined
to be based on English, but I think a principle of programming language
design ought to be applicable to languages based on any natural language.

From this perspective, case insensitivity isn't a particularly well-defined
concept.

For example, the German es-zet is equivalent to the two lower-case
letters 'ss'.  However, there is no capital es-zet.  If we decide
to fold all symbols to a canonical case, we run into this problem
in languages where some characters have case (es-zet is lower case)
but have no case counterparts.

On the other hand, suppose we abandon the notion of canonical case;
then we would have to group symbols into equivalence classes of some
sort for comparison purposes.  I claim that, no matter how you do this,
some people will find it counter-intuitive.  For example, should the es-zet
be identified with the two-letter sequence 'ss'?

Somebody else argued that case-insensitvity is a Good Thing because
people remember names by their sound, and sounds don't have distinguishable
case.  However, how often do you hear programs spoken?  There are too
many other conventions (parentheses nesting, etc) that make it essentially
impossible to read programs aloud in any comprehensible way.  The canonical
way to learn a program is to *read* it, not hear it.  Therefore, I think
programming languages should adapt the convention that things are
same if they *look* the same.

Of course not everybody agrees with this, but at least it's unambiguous
and easy to understand.

I challenge anybody to come up with a reasonable (to explain, and to
implement) definition of case-insensitivity that is not dependent
on the English language's rather unusual dual-case alphabet.



Wed, 12 Apr 1995 06:02:05 GMT  
 Case insensitivity and non-English languages

Quote:
>Somebody else argued that case-insensitvity is a Good Thing because
>people remember names by their sound, and sounds don't have distinguishable
>case.  However, how often do you hear programs spoken?

Quite often the identifiers used in programs will be spoken about. So this
makes it difficult to distinguish 'fred' from 'Fred', without entering
into a discussion about "Do you mean fred with a capital or lower case
f?" And that's just a simple example.

Quote:
>There are too
>many other conventions (parentheses nesting, etc) that make it essentially
>impossible to read programs aloud in any comprehensible way.  

The symbolic representation of programs is already complicated enough. Why
add the extra complexity of case sensitivity? Please can we keep programming
simple for people like me!

Quote:
>The canonical
>way to learn a program is to *read* it, not hear it.  Therefore, I think
>programming languages should adapt the convention that things are
>same if they *look* the same.

Well because of the way we are taught to read "Fred" does look the same as
"fred". 'F' and 'f' are the same character. The upper lower case distinction
is just a typographic convention to make things easier to read. Of course
one can bring up esoteric examples like German's 'es-set' (or whatever it
was), but that does not detract from the let's keep things simple argument.

--

"Where is the man with all the great directions?...You can't imagine it,
 how hard it is to grow, Can you imagine the order of the universe?" ABWH
Disclaimer:Opinions and comments are personal.



Sat, 15 Apr 1995 09:45:26 GMT  
 Case insensitivity and non-English languages

Quote:

> Quite often the identifiers used in programs will be spoken about. So this
> makes it difficult to distinguish 'fred' from 'Fred', without entering
> into a discussion about "Do you mean fred with a capital or lower case
> f?" And that's just a simple example.

Good for you! You have just proven that it is impossible for
Mathematicians to talk about their work.

-gjc



Sun, 16 Apr 1995 22:28:36 GMT  
 Case insensitivity and non-English languages
Regarding saying symbols aloud:


Quote:
>Good for you! You have just proven that it is impossible for
>Mathematicians to talk about their work.

I have trouble believing mathematicians can get very far discussing their
theorems without a blackboard.  Besides case, they also use fonts,
alternate language scripts, super- and subscripts, etc.

I imagine that while a mathematician might write "R" (usually with a double
vertical stroke), he'll say "reals", just as he says "factorial" when he
writes "!".  Also, there's quite a bit of context involved in mathematical
discourse; when I say, "aleph null" competent listeners know that "null"
is a subscript 0.

That's not to say that similar things don't go on with computers.  When I
say, "sigint" to a Unix programmer, he knows I'm talking about the macro
SIGINT in /usr/include/signal.h.

Back to the original discussion, though...

I've used quite a few case-sensitive and case-insensitive languages, and I
can get used to either.  Personally, I like systems that do insensitive
matching but preserve the original case, although it can be annoying if the
first input happens not to be your preferred style.

In languages that discourage global variables, it's pretty unlikely to need
symbols that are distinguished by case.  In C, case conventions are used to
distinguish macros from ordinary identifiers, and in the X libraries many
packages use weird capitalized prefixes (XFoo, XtBar, etc.).  In Common
Lisp, however, packages are generally used instead.  And in Scheme, you can
do quite a bit of packaging with lexical scoping, and there have been some
proposed lexical module constructs.  Since case is insignificant, we often
find programmers using it to make code more readable, e.g.

(define FOO (lambda (x) (frob x '())))
(define BAR (lambda (y) (foo (+ y y))))

I've also used case when sending patches to my vendors; I'll uppercase the
new code (actually, when I'm sending to Symbolics I switch fonts rather
than case, but it's the same idea).
--
Barry Margolin
System Manager, Thinking Machines Corp.




Mon, 17 Apr 1995 14:56:18 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Non-English-language oddities in VW

2. LabView 5.1 support of non-English languages

3. non-english language and TCL

4. Some thoughts about Python, python.org and non-English languages

5. case INsensitivity

6. case insensitivity

7. Poll time - case insensitivity

8. SUMMARY: Preferences toward case sensitivity/insensitivity

9. Checking hash key's and values, with case insensitivity

10. string->symbol and case insensitivity confusion

11. Case insensitivity

12. Case insensitivity (fwd)

 

 
Powered by phpBB® Forum Software