Reply to Re: array() VS Array()

Your name:

Reply:


Posted by Tony Marston on 05/15/06 21:26

"Kimmo Laine" <spam@outolempi.net> wrote in message
news:yMZ9g.4933$aB4.3177@reader1.news.jippii.net...
> "Tony Marston" <tony@NOSPAM.demon.co.uk> wrote in message
> news:e49mta$pvm$1$8300dec7@news.demon.co.uk...
>>
>> "Andy Jeffries" <news@andyjeffries.co.uk> wrote in message
>> news:pan.2006.05.15.09.54.44.663938@andyjeffries.co.uk...
>>> On Sun, 14 May 2006 16:38:26 +0100, Tony Marston wrote:
>>>> The removal of case-insensitive functions names would be a totally
>>>> WRONG
>>>> move IMHO as it would serve no useful purpose. The argument "to be
>>>> consistent with other languages"
>>>
>>> I'd say a better argument would be so it's consistent with itself.
>>> Variable names and member variables are case-sensitive so it's counter
>>> intuitive to a beginner to have the language partially case-sensitive.
>>>
>>> Just MHO....
>>
>> But if a language allows the same name to mean different things if
>> specified in a different case this could lead to code which is confusing
>> and therefore difficult to maintain. It *should* be the primary objective
>> of every language to avoid such features instead of deliberately
>> implementing them. This is why the GOT verb is frowned upon and excluded
>> from many languages, and why the ALTER verb in COBOL is considered an
>> absolute no-no.
>>
>> In the English language a word has only one meaning regardless of case
>> (such as 'dog', 'Dog' and 'DOG') so why should computer languages be any
>> different?
>>
>
>
> WeLL IF that IS iNdEED the CAse That CapS Don'T MATTER at all in ENgliSH
> then why DO You SupPose We HaVE them IN thE FIRST PlacE? If IT dOEsN'T
> MAKE AnY DIFfeRence TheN WHY is Writing likE This annoying?

While I agree that deliberately mixing case like is very annoying to a human
reader, I still stand by my assertion that for nouns and verbs (which can be
equated to variables and functions within a computer langage) that a change
in case does NOT change the meaning of a word..

> I say that they DO have more than one meaning. Why do we write spoken
> languagues like English starting each sentence or name with a capital
> letter and the rest in small letters? It's just a set of rules, and when
> spoken the caps doen't mean anything.

Human conventions in the construction of sentences are irrelevant to this
topic. Do you start each line of code with a capital letter?

> Why do we have these rules then? To distinct certain differences, to
> improve readability of the writing. For instance 'Jack' and 'jack' mean
> different things. With a capital J Jack is someone's name, but with a
> lower case j it could mean a microphone plug or a jack hammer

That is irrelevant as computer languages do not differentiate between words
which are nouns and words which are names. There are simply nouns
(variables) and verbs (functions).

>.Equally in PHP it's common practise that defined constants are written
>with CAPITALS and mostly everything else in lowercase.

Unfortunately different groups of people using different languages may
invent totally different "standards" as to what should be upper case and
what should be lower case. But why on earth should one persons preferences
be enforced on everyone else. All computer languages were originally
insensitive to case, so what arrogant moron decided to make the switch? What
was his justiification?

> Likewise it's traditional to write SQL KEYWORDS in capital and fieldnames
> in lowercase in an SQL query.

You would have loved the people at my previous contract. Their stanards were
totally the opposite - all keywords in lower case and all database, table,
field and user-defined function names in upper case. Why? Just because,
that's why. What a stupid argument, especially when the underlying language
didn't care.

> There _is_ a difference between small and capitals, you just fail to see
> it because you're clinging to the fact that PHP is a spoken language
> (which it is not).

No. My point is that I have worked for over 20 years using computer
languages which were totally insensitive to case (assembler, COBOL, quiz,
quick, qtp, SPL, Rapid, Transact, Insight, Uniface, SQL) and I cannot see
any problem which is solved by making any language sensitive to case. Just
the opposite, in fact, I can only see the introducion of new problems.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

[Back to original 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

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