You are here: Re: Breaking backwards compatibility - good or bad? « PHP Programming Language « IT news, forums, messages
Re: Breaking backwards compatibility - good or bad?

Posted by Colin Fine on 10/15/33 11:35

Kimmo Laine wrote:
> <tony@marston-home.demon.co.uk> wrote in message
> news:1135328348.078891.300880@g49g2000cwa.googlegroups.com...

>>
>>There is a big difference between *allowing* the programmer to choose
>>which case to use, and *forcing* the programmer to use a particular
>>case.
>>
>>What I find annoying is the potential for case-sensitive languages to
>>allow the same variable or function name to exist AND BE DIFFERENT
>>ENTITIES.
>
>
> But it's not the same variable or function name, it's different!! If I had
> variables $foo and $FOO, the other would be 0x66 0x6F 0x6F as ascii codes,
> the other 0x46 0x4F 0x4F. Those aren't the same.
>
This is proof by blatant assertion.
That it what you are trying to establish, and what Tony is challenging.

> In some spoken languages there are no upper and lower case, japanese for
> instance. In such a language it really doesn't matter which case you want to
> use, because there is no upper or lower.
>
In no spoken language is there upper and lower case. Case is an aspect
of (some) writing systems, not languages.

I don't think that my point is nitpicking, for the following reason:

Consider dictating a command, or some lines of a program, to somebody
over the telephone (a fairly frequent activity in my software support
job). You can dictate every individual character, but when there are
words or number you usually don't have to - you can say "minus product"
and most users will know to type "-product".
But when they are using a case-sensitive system, this is not enough. You
(may) have to say "minus product in capitals" or "minus product with
capital p".
I'm not talking particularly the inconvenience and possibility for error
in this (though they are there) - after all, there's nothing to stop me
saying "minus capital-p little-r little o ..." etc.
What I'm doing is supporting Tony's contention that to people "PRODUCT",
"product" and "Product" are the same thing.

As I said in a previous post, I have long thought that case sensitivity
was an utterly bad idea. In the case of PHP I nevertheless felt that
PHP5 marked a step forward over PHP4, but Tony has changed my mind.
The one place where it has improved things (that I can now say
class MyClass
....
if get_class($var, 'MyClass') ...
and have it work)
is not enough to justify the change.

> If you've ever studied physics, you might've noticed how symbols are used in
> equations all the time. In that case, small and uppercase is everything.
> it's hell of a difference to write E=mc^2 than e=MC^2. The other is the
> Einsteins most famous equation Energy = mass * speed of light to second
> power, and the other is just non-sense, Napier's constant = mass of earth *
> capacitance to second power, or something like that.
>
> In physics upper- and lower case symbols have totally different meanings.
> This is not directly applicable to php, but the world of physics with all
> the symbols and equations is a language that is globally understood
> regardless of it being case-sensitive. I don't expect to convince you that
> php should be case-sensitive, all I'm saying is that physics as well as
> mathematics sets an example of a case-sensitive language that really works.
> And it's been that way for quite a long time now, the history of math goes
> way back, thousands of years, before programming was even a concept.
>
This is a feeble argument. The symbols used in physics are almost always
single letters. This is a very different case from multi-letter
identifiers (which are in many cases words, or made of parts of words).

Colin

 

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

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