Re: Case-sensitivity as option?



On Jan 5, 12:55 pm, an...@xxxxxxxxxxxxxxxxxxxxxxxxxx (Anton Ertl)
wrote:
m_l_g3 <m_l...@xxxxxxxxx> writes:
What I would like to know is what about case-insensitivity
for non-English names?

The reason why we chose case insensitivity in Gforth is to allow to
write the standard words in lower case.  And I think that's also the
main reason for other systems.

The reason is:
-------------------
: value create , does> @ ;

Value a

: FOO A ;

foo .
-------------------

If a system supports non-ASCII characters, it's probably best to treat
them case-sensitively.  This should minimize the number of surprises
if code with different encodings is mixed (or if the code is written
in one encoding, but the system works with a different encoding).

An example might be mixing code from a French programmer (with Latin-1
encoding) and a Czech programmer (using Latin-2 encoding).  The Czech
names might look strange when using a Latin-1 font (and vice versa for
the French names with a Latin-2 font), but apart from accidental
collisions (which could also happen with independently developed
libraries in the same encodings) the libraries should work just as
they do in their native encoding.

If everybody uses Unicode/UTF-8 (or converts from some other encoding
to Unicode), then at least the misinterpreted-encoding problem would
go away, but there may still be other reasons for avoiding global case
insensitivity: case rules may depend on the language, and case
conversion is not necessarily a bijection.

So, overall, case insensitivity for ASCII and case sensitivity for
non-ASCII seems to be a good compromise.  It won't win any purity
contests, though.

This wins nothing. Indeed. Forget it.

(Usage of 2 encodings in Windows, one for command line and
another for GUI, is the reason why most Russian
Forths are case-sensitive.

Another good example for my argument.

Which argument? Having DUP and DROP? Fine to have.

-Helmar

PS: To make this posting it's true that two keybords died it's
proposed dead. I'm currently in a mode to stay kind and be friendly
because of the two lost keyboards. So do not take to serious any
kindness or friendliness - it might be caused by a big loss in
hardware and a last try to express things on an Apple PRO Keyboard
(first generation = hell).

.



Relevant Pages

  • Re: Case-sensitivity as option?
    ... The reason why we chose case insensitivity in Gforth is to allow to ... in one encoding, but the system works with a different encoding). ... names might look strange when using a Latin-1 font (and vice versa for ...
    (comp.lang.forth)
  • Re: Unicode support
    ... I convert string to the form it was in the script file, ... Really, matter is more complicated, because if encoding system happens ... Second problem is that if I want for some reason to change encoding ... So I have to embed actual value of [encoding system] into procedure body ...
    (comp.lang.tcl)
  • Re: RESULT : Create moderated newsgroup uk.rec.cycling.moderatedPASSES 128:24
    ... For the obvious reason that HTML is not plain text, ... This is the reason for the UUEncoding (or more fashionably these days yenc ... encoding) of 8 bit binaries before posting them. ... Now HTML certainly qualifies as a form of encoding. ...
    (uk.net.news.config)
  • Re: JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.)
    ... >> Definitely a good reason. ... Only the shortest encoding of a character is valid ... That means any code which transcodes UTF-8 to another encoding (such ...
    (Linux-Kernel)

Loading