|
Posted by Tony Marston on 08/05/06 14:46
"Gertjan Klein" <gklein@xs4all.nl> wrote in message
news:6ci8d252gkmcn31fpsh0kcfvtfgipp7t43@4ax.com...
> Jerry Stuckle wrote:
>
>>Tony Marston wrote:
>>>
>>> The ability to have 3 different functions called readfile(), readFile()
>>> and
>>> ReadFile() causes problems.
>>>
>>> The ability to have 3 different variables called box, Box and BOX causes
>>> problems.
>>>
>>> Or am I the only person who can see this?
>>
>>Yep, you're the only person to see it, Tony. The rest of us are more
>>intelligent than that.
>
> Please don't speak for me (or qualify "the rest of us", next time). He
> is not the only one, and your disparaging comments don't make you look
> all that intelligent. Although I'm not as persistent in this thread as
> you and some others, I still largely agree with Tony that what he
> describes above causes more problems than it solves. Neither you nor I
> have any idea what the silent lurkers think.
>
>>BOX is a defined constant
>>Box is a class name
>>box is a variable name - an object of type Box
>
> Tony specifically described three *variables* called box, Box, and BOX.
> Not a constant, classname, and variable.
>
> 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.
>
> I personally (slightly, not religiously) would prefer it if a language
> had other means to distinguish between classes, constants, variables,
> etc., rather than having to rely on programmers adhering to such
> conventions (I've seen too many that don't).
That's why I like the use of different symbols to identify different
objects, not the use of case. Foir example in PHP we havethe following:
foo - a constant (yes, I know it shold be in upper case)
$foo - a variable
foo() - a function
$object->foo() a class method
$object->foo - a class property
This is eminently more memorable than a mixture of upper and lower case
(IMHO).
> This is a personal
> preference, to which I'm entitled, as you are to yours, obviously.
> Trying to make such a preference into a universal truth (as both you and
> Tony try to do) does not make a lot of sense to me.
I am not trying to make ALL languages case insensitive, I'm simply saying
that ALL languages should not become case sensitive just because SOME are.
There is a slight difference.
Also, there are some languages (like Visual Basic) which *appear* to be case
sensitive, but which in fact will automatically correct any differences in
case so that instead of *different* objects you actually refer to the *same*
object. So Visual Basic does not cause the problems I have specifically
highlighted.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|