Standardizing case sensitivity 
Author Message
 Standardizing case sensitivity

Enough people have discussed the issue of whether FORTH systems should
be case sensitive or insensitive to make me realize that the ANS com-
promise settled nothing. Here are some of the comments

Heribert Dahms at University of Karlsruhe, Germany

Quote:

> : Aaarghhh -- that's begging the question. If it's case insensitive then
> :  : FOO  and : foo are the **same** word
> :
> : So -- you don't ** DO ** [ or even ** do ** ] such things.
> :
> Yes, don't do that in dpANS programs which should have no environmental
> dependency, i.e. write all definition names in uppercase.

> : Surely there's enough permutations of 26 alphabetic characters -- let alone
> : numerics and punctuation marks -- to define any "function" explicitly
> : without imposing case sensitivity?
> :
> There are even more than 26 graphic chars and names may be up to 31 in
> length, so I think I need not compute the zillions of permutations here 8-)

Enough:

      % 68 % 31 F** E. 6.423567e56 ok

Quote:
> : I don't recall ever reading a message in this newsarea that was all in
> : upper case. Do that in other areas and you'll be told to STOP SHOUTING.
> : So why recommend writing source code that way? The written English
> : language isn't case sensitive. It's another Jurassic park hangover
> : from the days of teletype machines -- and keyboards that didn't have
> : a shift key facility.
> :
> If you program sometimes also in languages other than Forth, you
> may know that even if a language is case sensitive, external/global
> symbol and entry point names processed by a linker may be treated all
> uppercase!

Article 12809  Re: F-PC and lower case
Mike Coughlin at Free Software Foundation

Quote:
> This topic shows the problems and foolishness of trying to write a
> standard. We have to write standard portable Forth code in capital letters
> because it is the only way the code will work on different platforms. Yes,
> it is because programs used to be written on teletype machines and on
> keypunch machines too. But if you want to have a standard, then you can't
> change things as much as you can if you don't want to have a standard.
> Now if we can't agree on something as simple as capital vs. small letters
> how are we going to agree on something more complicated like disk I/O?
> How many people who say they want standards and portability assume things
> are going to be done the way they do things and then lose their interest
> when they find out differently?

Article 12793  Re: F-PC and lower case
J.Plewe at GWDG, Goettingen


Quote:
> : Category 21,  Topic 43

: Message 4         Thu Aug 12, 1993

Quote:
> : E.RATHER                     at 22:07 EDT
> :
> : ANS Forth tolerates either case-sensitive or case-insensitive
> : implementations. See Section 3.4.2 for the rule.  All systems must
> : recognize standard words in upper case (as shown in the Standard).
> : This was a subject of great controversy and strong feelings on both sides.
> : After extensive discussion and a survey, we agreed on this compromise.
> How do we handle this situation:
>           : foo ( -- )    ." Hello" ;
>           : FOO ( -- )    ."  World!" ;
>           : HW  ( -- )    foo FOO ;
> HW would print different things on a case-sensitive and case-insensitive
> system!?

I would like to repeat what I said (the gist, not the exact words):

"I do not insist your system distinguish UC from LC. But dammit,
systems with both modes should standardize on how to toggle to be
either case-sensitive or UC only. That should raise no one's hackles."

Please note: in F-PC one says CAPS ON or CAPS OFF. I do not know how
one does it in HS/FORTH (it comes on case-sensitive, so I never bothered
to find out).

However, I for one would be willing to accept the F-PC words for a standard,
even if they arise from the feared and hated Public Domain.

--jvn

PS  I am also willing to abide by the ANS compromise and inform people
    that a library I supply requires case-sensitivity (so they should
    check that LC words do not repeat already-defined UC words -- easiest
    check: try a compile and get an error mss for each repeat!); or else
    if I claim it is ANS compliant it will be entirely in UC.

    But again, speaking for myself, the fact that there are 6x10^56
    permutations of 26 UC letters and 42 other characters is entirely
    irrelevant. I like the look of a page with alternating UC and LC.

    If FORTH is supposed to be clear, why work with our heads in a bucket?



Wed, 07 Feb 1996 04:37:05 GMT  
 Standardizing case sensitivity

One point I'd like to add to this thread that may not have occured to
some: a standard program (which is a completely different beast from a
standard system, for those few out there who remain ignorant of the
purpose and intent of standards) may use mixed case as long as it uses
upper-case for all standard words, uses *consistent* case for all
definitions in the program, and does not have any words that would
cause confusion in a case-insensitive system.  Thus:

: foo  ( -)
   bar IF baz ELSE barfoo THEN ;

Would be perfectly acceptable standard code.  (Assuming that bar, baz,
and barfoo have been previously defined, OC.)  :-)

OC, the system may or may not consider "foo" to be equivalent to "FOO".
But as long as the code is consistent throughout, this should be
irrelevant.
--
Chris Waters    | "By experimentation, I have found that if I stand still and



Wed, 07 Feb 1996 09:36:09 GMT  
 Standardizing case sensitivity

: One point I'd like to add to this thread that may not have occured to
: some: a standard program (which is a completely different beast from a
: standard system, for those few out there who remain ignorant of the
: purpose and intent of standards) may use mixed case as long as it uses
: upper-case for all standard words, uses *consistent* case for all
: definitions in the program, and does not have any words that would
: cause confusion in a case-insensitive system.

Yes, what would cause confusion would be to redefine standard words if the
new definition names aren't uppercase, too.
But isn't it a good programming style to write all application definition
names lowercase or mixedcase and all system provided words uppercase (with the
exception of system redefinitions as above)? See at first glance what's it ...
Of course, lowercase or mixedcase names must be distinct from uppercase ones!




Wed, 07 Feb 1996 21:16:30 GMT  
 Standardizing case sensitivity

Quote:

> Please note: in F-PC one says CAPS ON or CAPS OFF. I do not know how
> one does it in HS/FORTH (it comes on case-sensitive, so I never bothered

                 ^^^^^^^^

Quote:
> to find out).

OK, in HS/FORTH one says CAPS to get UC-only, -CAPS to be case-sensitive
again. Like F-PC, but enuf different to be a) annoying; b) imposs. to
remember. *** That's *** why I think we need a standard way to do it,
iff it is available.  --jvn


Thu, 08 Feb 1996 08:47:05 GMT  
 Standardizing case sensitivity

Quote:

>Enough people have discussed the issue of whether FORTH systems should
>be case sensitive or insensitive to make me realize that the ANS com-
>promise settled nothing. Here are some of the comments

I think it DOES solve the problem for 99-and-44/100% of the software
written.

I am speaking, of course, of software which doesn't make the insane
assumption that...

    myvar

...and...

    MYVAR

...are 2 different words.

I agree with an earlier poster (can't remember who it was), that
defining 2 different words that just differ in case is just
inherently a bad idea and should never be done.  Perhaps the
standard should state that it is not allowed.

As far as I can see, that's the only price to pay to completely
settle the issue.

(Of course, I expect Mike Coughlin to post an essay on why it is
a complete abomination of Forth to make this stipulation).



Sat, 17 Feb 1996 14:40:25 GMT  
 Standardizing case sensitivity

Quote:
Mike Haas writes:

>I am speaking, of course, of software which doesn't make the insane
>assumption that...

>    myvar

>....and...

>    MYVAR

>....are 2 different words.

I have seen programs that use lower case for variable names and
upper case for word names.  I may have even read somewhere that
this is Chuck Moore's style as well.  I'm not sure if I'd use
this convention, but it is interesting.

--
James Hague



Sat, 17 Feb 1996 23:11:52 GMT  
 Standardizing case sensitivity

: I agree with an earlier poster (can't remember who it was), that
: defining 2 different words that just differ in case is just
: inherently a bad idea and should never be done.  Perhaps the
: standard should state that it is not allowed.
:
It says it's an environmental dependency. That's sufficient, IMHO.




Mon, 19 Feb 1996 04:30:50 GMT  
 Standardizing case sensitivity

Quote:


> >Enough people have discussed the issue of whether FORTH systems should
> >be case sensitive or insensitive to make me realize that the ANS com-
> >promise settled nothing. Here are some of the comments

> I think it DOES solve the problem for 99-and-44/100% of the software
> written.

> I agree with an earlier poster (can't remember who it was), that
> defining 2 different words that just differ in case is just
> inherently a bad idea and should never be done.  Perhaps the
> standard should state that it is not allowed.

> As far as I can see, that's the only price to pay to completely
> settle the issue.

> (Of course, I expect Mike Coughlin to post an essay on why it is
> a complete abomination of Forth to make this stipulation).

Well, I occasionally like to mix up cases for easier readability. It's
only a style, most of my programs are for my own use, so why shouldn't I
if I want to?  *** All *** I was asking was that, in any system that allows
case sensitivity, the word that toggles it on and off should be standard.
I was proposing a standard usage, because, darn it! I just can't remember
all the different ways to do it.

--jvn



Tue, 20 Feb 1996 09:03:39 GMT  
 Standardizing case sensitivity

Quote:

>Mike Haas writes:

>>I am speaking, of course, of software which doesn't make the insane
>>assumption that...

>>    myvar

>>....and...

>>    MYVAR

>>....are 2 different words.

>I have seen programs that use lower case for variable names and
>upper case for word names.  I may have even read somewhere that
>this is Chuck Moore's style as well.  I'm not sure if I'd use
>this convention, but it is interesting.

That's not whAt I was addressing.  I was posting about the practice
of writing code in a case-sensitive forth, then giving the same text
to two different words, that just differs in case.  That's asking
for trouble.

- Show quoted text -

Quote:

>--
>James Hague




Mon, 26 Feb 1996 04:40:24 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Case Sensitivity (actually case-insensitive file-systems)

2. Case sensitivity in SQL query

3. case sensitivity in db queries

4. Case sensitivity in other languages

5. Case sensitivity

6. My two cents on case-sensitivity

7. ANS Forth and CaSe sensitivity

8. Case sensitivity - Again

9. CaSe sensitivity

10. CaSe sensitivity

11. More on CaSe sensitivity

12. Case sensitivity variable controversy

 

 
Powered by phpBB® Forum Software