Re: Case sensitivity in programming languages.




Tony Marston wrote:
"Shelly" <sheldonlg.news@xxxxxxxxxxxxxxxx> wrote in message
news:6HGzg.6581$gF6.1110@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"Tony Marston" <tony@xxxxxxxxxxxxxxxxxx> wrote in message
news:ean53g$rlk$3$8300dec7@xxxxxxxxxxxxxxxxxxx

"Shelly" <sheldonlg.news@xxxxxxxxxxxxxxxx> wrote in message
news:Gslzg.2333$0e5.990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Tony Marston" <tony@xxxxxxxxxxxxxxxxxx> wrote in message
news:eakmf1$4g8$1$8302bc10@xxxxxxxxxxxxxxxxxxx

All you are doing, yet again, is identifying that the use of different
case was only introduced as a programmer convention in those languages
which make it difficult to differentiate between variables, constants,
functions and methods. Decent languages do not have such a problem, yet
you insist on making a programmer convention in one particular language
a requirement in all other languages for no good reason.

Frankly, I find it a pain in the ass to have to prepend a blankety-blank
"$" in fron of my variables. Why couldn't this language (PHP) be smart
enough to know that what is on the left hand side is a variable?
However, I accepted is a being part of the language and moved on --
rather than rant about it. If I want a constant, I can write it all in
caps. (so much for languages that can "differentiate between a
variable, etc.").

I prefer the PHP way. I have no problem with using foo, $foo, foo() and

You said it all right here - **YOU** prefer it that way, ergo that it the
right way! Talk about trying to impose your preferences on the entire
community!

Frankly, there is no reason why the computer could not know which is which
simply by either having a declaration or by its first usage. There is no
real need for the dollar sign. My guess is that it was put in for
readability and identification. Gee, that is the same reason as case
sensitivity.

I disagree. I *MUCH* prefer to see foo, $foo, foo() and $object->foo() to
differentiate between constants, variables, functions and methods than a
slight alteration in case. So do the authors of PHP, ad its millions of
users.

I disagree, the authors of php use many upper and lower case naming
conventions.

http://cvs.php.net/viewvc.cgi/php-src/CODING_STANDARDS?revision=1.32.4.3&view=markup

Here's part of the section titled Naming Conventions. ( They also use
the C convention of naming macros in all uppercase and functions in all
lowercase seperated with'_' )

5] Variable names should be in lowercase. Use underscores to separate
between words.

[6] Method names follow the 'studlyCaps' (also referred to as 'bumpy
case'
or 'camel caps') naming convention, with care taken to minimize the
letter count. The initial letter of the name is lowercase, and each
letter that starts a new 'word' is capitalized.

Good:
'connect()'
'getData()'
'buildSomeWidget()'

Bad:
'get_Data()'
'buildsomewidget'
'getI()'

[7] Classes should be given descriptive names. Avoid using
abbreviations where
possible. Each word in the class name should start with a capital
letter,
without underscore delimiters (CampelCaps starting with a capital
letter).
The class name should be prefixed with the name of the 'parent set'
(e.g.
the name of the extension).

Good:
'Curl'
'FooBar'

Bad:
'foobar'
'foo_bar'

Tim Hunt

.



Relevant Pages

  • Re: [Usability] The use of ellipsis (...) in menus
    ... GNOME HIG, and GNOME itself. ... implementation of this convention adds to the user's confidence. ... the dots tell you that you will get a dialog that may shed ... I'd be curious what conventions other languages use to imply this ...
    (GNOME)
  • =?utf-8?Q?Re:_Degree_symbol_=28=C2=B0=29_appears_au?= =?utf-8?Q?tomatically_-_how_to_avo
    ... In certain languages, the convention is to ... To ensure that the colon stays with the ... Word MVP FAQ site: http://word.mvps.org ...
    (microsoft.public.word.docmanagement)
  • Re: Im finally asking (re French)
    ... explicitly aware of the glide that distinguishes our vowel from the ... similar-sounding one in those languages. ... commonly understood convention? ... internationally correct way to indicate pronunciation. ...
    (sci.lang)
  • Re: for loop speed trick?
    ... It is a convention across many languages to use i while iterating over arrays, ... Straying from that convention may cause more confusion than someone who can't tell letters apart... ... In all the languages I use, the convention is rather to avoid using one letter variables. ...
    (comp.lang.javascript)
  • Re: Case sensitivity in programming languages.
    ... Every time someone creates a post about case sensitve languages I reserve ... At least not in PHPP, ... Thus I can create different things called 'foo' and reference each ... sensitive languages trying to force case sensitivity into ALL languages. ...
    (comp.lang.php)