|
Posted by Tony Marston on 08/08/06 13:12
"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:eJSdnbgtMaxMEkrZnZ2dnUVZ_qednZ2d@comcast.com...
> Tony Marston wrote:
>>
>>
>> I have said several times that the ability to create different functions
>> and variables with the *same spelling* but *different case* leads to
>> obfuscated and unmaintainable code, and should therefore be avoided. I am
>> not the only one with this opinion - check out item 21 on
>> http://mindprod.com/jgloss/unmainnaming.html
>>
>
> Yes, you have espoused this BS multiple times. Now you quote some unknown
> programmer with no documented credentials to back up your claim. How long
> did you have to search the internet to find this "essay"? Or is it your
> own under an assumed name?
I see. So anybody who expresses an opinion which is different to yours is
automatically a nobody? Wha an arrogant prick you are.
> I would rather go by recognized experts - like K & R, the Bjorn
> Stroustrop, the initial designers of Java at Sun, the developers of PHP,
> the folks who developed the XML spec, and even the majority of the people
> who have responded on this thread. They have done a lot more for
> programming than your unknown essayist - or you, for that matter.
>
> And they all agree that case sensitivity is a good thing.
But where do they say that the ability to use a word with the same spelling
but different case to produce a different word is a good thing? Being able
to use mixed case is one thing, but saying that the same word in upper and
lower case is actually a *different* word is something else completely.
> You don't have to use PHP or any other case sensitive language. Just go
> back to your beloved COBOL.
>
>>>
>>>You have yet to come up with a single credible argument.
>>
>>
>> See my previous comment.
>>
>
> You still have yet to come up with a single credible argument. See my
> previous comment.
I have told you several times. When most people read a word it has the same
meaning regardless of case. To suddenly say that by simply changing the case
of one letter you prodce a totally different word is confusing. Maintaining
someone else's program where the same word is used in multiple places, but
because of small differences in case it actually becomes a different word
would be a nightmare to most people.
>>>Yes, you are the expert at that. I NEVER claimed I would use all three
>>>as variables. Yet you have completely ignored that.
>>
>>
>> But you have said repeatedy that you would use the same word (i.e. the
>> same spelling) but different case to mean different things
>>
>
> Yes, I did. And I'm not going to repeat myself again.
>
>>>>>
>>>>>>Using the same name, with different case, for related things, as you
>>>>>>described above, is a sensible convention to do things -- in languages
>>>>>>that can't distinguish these things in another way, and that are case
>>>>>>sensitive. It does not mean that making a language case sensitive is a
>>>>>>good thing in itself.
>>
>>
>> It is a *convention* among certain programmers and not a *requirement* of
>> the language.
>>
>
> True. And these conventions take advantage of case sensitivity.
You take advantage of case sensitivity to produce obfuscated and
unaintainable code. That is not a good idea.
>>>No but now tell me - what is
>>>
>>> "foo"
>>>
>>>Is it a constant? a variable? a class name?
>>
>>
>> In PHP it can be any of those things. Each is defined in a different
>> manner, and each is referenced in a different manner. There is no
>> confusion between foo the constant, $foo the variable, foo() the function
>> and $object->foo() the class method.. PHP does not use different case to
>> tell the difference, and neither do most other languages. It may be a
>> *convention* amongst certain groups of programmers, but it is not a
>> language *requirement*.
>>
>
> Not if you follow accepted programming standards.
They are not *standards*, they are merely the *conventions* of one small
group of programmers who want t force their stupid ideas onto others.
>>>With case sensitivity, I know IMMEDIATELY
>>>
>>>
>>> FOO is a constant
>>> Foo is a class
>>> foo is a variable
>>>
>>>I don't need to search through the code to figure out what it is. In
>>>fact, I don't even NEED to see the code.
If you don't see the code you won't see the case that was used, therefore
you wont to able to tell diddly squat.
>> In PHP the use of case in such a way is not necessary. FOO is a constant,
>> $FOO isa variable and FOO() is a function. PHP uses symbols to tell the
>> difference, not case.
>>
>
> Only if you add () or $ to every instance in your documentation.
In PHP thse symbols don't appear in the documentation, they are part of the
code.
>>>>>>I personally (slightly, not religiously) would prefer it if a language
>>>>>>had other means to distinguish between classes, constants, variables,
>>>>>>etc.,
>>>>
>>>>
>>>>You mean just like PHP already does? Without the use of case?
>>>>
>>>
>>>PHP does it just fine with case.
>>
>
> Sure does. And I'm glad it does.
PHP does not use case to tell the difference between a function and a
variable. Nor do most other languages. Therefore the *convention* of using
case in such a manner is merely the practice of one small group.
>> But it is not obligatory. With PHP (and most other languages) I can use
>> whatever case I like and the language will not complain for the smple
>> reason that it does not care. There are no *language rules* about how to
>> use case, only *programer conventions*.
>>
>
> No, there are not language rules. They are programming conventions
> (standards) developed to take advantage of the rules.
I disagree.They are *conventions* used by one group of programmers in one
language which are now being forced upon other groups of programmers in
other languages. Different groups have different conventions, different
languages have different conventions.
> And standards are a good thing.
Some standards are, some standards are not.
>>>
>>>Not at all. I am not trying to force case sensitivity into COBOL or
>>>FORTRAN, for instance. Unlike you, who are trying to force case
>>>insensitivity into already-case-sensitive languages such as PHP.
>>
>>
>> Gotcha! Both PHP 4 and PHP 5 are case INsensitive when it comes to
>> function names and method names. If I try to define another function or
>> method with the same spelling but different case PHP will object. If I
>> try to reference a function or variable with the correct spelling but
>> different case then PHP will ignore the difference in case and refer to
>> the *single* method or function which has that *spelling*, regardless of
>> any dfferences in *case*.
>>
>
> True, but they are case sensitive in everything else - variables,
> constants and class names, for instance. And you're trying to get people
> to make those case-insensitive, also.
Would that be a bad thing?
> Personally, I would MUCH rather have PHP functions be case sensitive,
> also.
>
>>>>
>>>>Personally I *LOVE* it. It means that I don't have to rely on different
>>>>case totell the difference.
>>>>
>>>
>>>So you would rather be forced to use an artificial construct to identify
>>>a variable? It figures. Why not get your beloved COBOL to implement
>>>this "feechur"?
>>
>>
>> I am not advocating any changes in COBOL. I a advocating against the
>> introduction of more case sensitivity into PHP jst to be "consistent"
>> with other people's conventions.
>>
>
> No, but you're trying the force the rest of us to use case-insensitive
> work. PHP is already mostly case sensitive. The only place it isn't is
> in function names. That is rather inconsistent.
Changing one feature of a language just to be *consistent* with other
languges, especially when the result causes more problems than it solves, is
a move in the wrong direction.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|