You are here: Re: Case sensitivity in programming languages. « PHP Programming Language « IT news, forums, messages
Re: Case sensitivity in programming languages.

Posted by Jerry Stuckle on 08/09/06 00:04

Tony Marston wrote:
> "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.
>

You quote someone who no one ever heard of who posted an essay on the
internet. And you claim this proves the majority of programmers agree
with you.

Talk about arrogant prick. You define the term.

And yes, there are plenty of people whose opinions differ from mine and
I still respect them. You are not one of them.

>
>>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 need to read more. For instance, the Sun java developers recommend
conventions such as "Customer" for a class name and "customer" for a
variable name.

IOW, they endorse standards which have now been around for a couple of
decades.

>
>>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.
>

Fine. Go teach English. This is programming. And case matters in case
sensitive languages.

And you cannot claim it would be a "nightmare to most people". Only to
Tony. As a matter of fact, I have worked with literally hundreds of
programmers over the years, using case sensitive languages. NONE of
them felt it was a "nightmare".

And even in just this thread most people who have posted disagree with you.

>
>>>>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.
>

In your opinion only - and some unknown your found on the internet. The
vast majority of people who have posted in this thread disagree with you.

>
>>>>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.
>

Yes, they are standards. And they are not "one small group of
programmers" - they are the majority of programmers using Smalltalk, C,
C++, Java, PHP and other case sensitive languages.

And only you think their ideas are stupid. Sorry Tony, its YOU who are
STOOPID! STOOPID TONY!

>
>>>>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.
>

Eventually I may need to look at the code. But I can look at the doc,
also. And when you're dealing with 200 programmers on a three year
project, things like this are important.

And yes, I have been on such a project. And NO ONE thought the
standards laid out by the Project Manager (which follow what has been
described here and in other threads) was stupid or a nightmare.

But that's beyond you anyway, Tony. You're too stoopid to be able to
handle that. And you wouldn't be part of that project. We needed
capable programmers, not stoopid assholes.

>
>>>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.
>

Ok, in the doc then, what is foo?

>
>>>>>>>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.
>

No, but programming standards do use it. And it is not the practice of
"one small group". It is the practice used on every programming project
in which I've been associated - either as a programmer or a project manager.

The only "small group" here is Tony - he's a group of ONE. Not much
different than your IQ, either.

>
>>>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.
>

That "one group of programmers" consists of millions of programmers all
over the world. Pretty big group.

>
>> And standards are a good thing.
>
>
> Some standards are, some standards are not.
>

Yea, any standard you don't agree with is a bad standard. Now who's
being an arrogant prick?

>
>>>>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?
>

Yep.

>
>>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.
>


Go back to your COBOL, Tony, and leave PHP for intelligent programmers.
It's obvious it's way beyond your capabilities to understand.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация