|
Posted by Tony Marston on 08/04/06 14:28
"Shelly" <sheldonlg.news@asap-consult.com> wrote in message
news:sdvAg.4257$0e5.295@newsread4.news.pas.earthlink.net...
>
> "Tony Marston" <tony@NOSPAM.demon.co.uk> wrote in message
> news:easnt1$67b$1$8300dec7@news.demon.co.uk...
>>
>> "Shelly" <sheldonlg.news@asap-consult.com> wrote in message
>> news:CF8Ag.3576$0e5.3548@newsread4.news.pas.earthlink.net...
>>> You have yet to demonstrate **WHY** you believe it produces errors.
>>
>> Instead of repeating myself I shall point you to
>> http://www.tonymarston.net/php-mysql/case-sensitive-software-is-evil.html
>
> Excuse me, but having read the article at this link, it never addresses
> the question I asked. Not ONCE did you show where case sensitivity
> produces errors. Please go to
> http://www.tonymarston.net/php-mysql/case-sensitive-software-is-evil.html
> to locate you supposedly answered my question. Then, please, copy and
> paste the statement that you think answers my question.
>
> I am reminded of what many of my students have done in the past. They
> worked through a problem and gave an answer. The only thing wrong was
> that it wasn't answering the question asked.
5th paragraph down
1) Is any language issued with a set of function names in different
combinations of upper and lower case, such as 'dosomething()',
'doSomeThing()' and 'DOSOMETHING()', where each combination of case means
something different?
2) Is any language issued with a set of variable names in different
combinations of upper and lower case, such as 'box', 'Box' and 'BOX', where
each combination of case means something different?
Is the ability to have 3 different functions called 'dosomething()',
'doSomeThing()' and 'DOSOMETHING()' a good thing or a ad thing?
Is the ability to have 3 different variables called 'box', 'Box' and 'BOX' a
good thing or a bad thing?
If ti is a bad thing then why is it allowed?
>>
>>> Frankly, any time I even mistyped a name, the compiler barfed out that
>>> this was an undeclared variable or method.
You get a warning if you reference an undeclared variable in PHP if your
error reporting is set a the right level. You will always get a fatal error
with an unreferenced function or method.
BUT, and here is the point, PHP will allow you to create different variables
and methods where the spelling is the same but only the case is different.
Can you not see the problems that this can cause?
>> Great. So your compiler did not allow you to reference anyhing in a
>> different case. But did it actually allow you to create several variabes
>> or methods with exactly the same spelling but different case? If the
>> language does not allow it, then there is no real problem. It only
>> becomes a problem when the language DOES allow it.
>
> The language DID allow case. It was PHP. By the way, you keep saying
> that PHP is case insensitive.
I have NEVER said that PHP is case insensitive. It is precisely because of
its case sensitive nature that caused me to voice this opinion in the first
pace.
> That is not my experience. Run the following code snippet:
>
> <?php
> $Junk = "this is junk";
> echo "Junk = " . $Junk . "<br>";
> echo "junk = " . $junk . "<br>";
> ?>
>
> Clearly, PHP is case sensitive!
>
>>> No big deal. In **MY** OPINION, that little incovenience is
>>> **GREATLY** outweighed by the ability to read someone else's code and
>>> know right away what it is all about.
>>
>> Most languages don't use case to identify wheter something is a constant,
>> variable, function, or method, so the use of case is irrelevant.
>
> The direction is to use case in modern languages to make these
> distinctions.
Why, when it is unnecessary? PHP does not need differences in case to tell
the difference between a constant, a variable, a function and a method, so
the transfer of this "convention" from an obviously inferior language is
totally pointless.
> Yes, it is currently by convention, but in JAVA, at least, it is a
> UNIVERSALLY observed convention by ALL professional programmers.
There is no such thing as a universal convention that is followed by ALL
professional programmers. Different groups have their own different
conventions.
>>> Apparantly the vast majority of professional programmers agree with me
>>> because that is the direction in which all the newer languages are
>>> going -- even something as new as PHP.
>>
>> But people won't complain unless they hit problems, and I've seen
>> complaints from programmers who have suddenly been hit with a bug that
>> turns out to be case-related. I still hold the opinion that case
>> sensitivity causes problems instead of solving them, and I have seen no
>> evidence to the contrary.
>
> ....and you still have not as yet detailed even a SINGLE problem caused by
The ability to have 3 different functions called readfile(), readFile() and
ReadFile() causes problems.
The ability to have 3 different variables called box, Box and BOX causes
problems.
Or am I the only person who can see this?
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|