Juerd Waalboer wrote:
> Thomas Wittek skribis 2007-05-14 22:20 (+0200):
>> But I think that the name of an identifier (noun/verb, single/plural,
>> the meaning of the word) already gives enough context to understand what
>> type it is.
>
> [examples]

You are right, I should have weakened this sentence by "in most cases".
Tricky from you to cut out my next sentence, which was about additional
context that's needed in this cases and that your examples are missing
of course:

> Thomas Wittek also wrote:
>> And every use of it (assigning and reading) additionally makes it
>> clear.
>> So _for me_ there is no need for an additional hint for the type.

Juerd Waalboer wrote:
> And how on earth would you write "object.foo()", where foo is a variable
> holding a reference to a method, not the name of the method, if you had
> no sigils?

That would not happen in my code.
I consider having the same name for different things bad.
I even wouldn't do that _with_ sigils.

> The Perl Way:
> $object.foo() calls the method called "foo".
> $object.$foo() calls the method that is in the variable $foo.

My way:
someref = &somemethod
object.someref()

Of course you could argue that you don't know in advance, if "object"
has a method with that name, so you cannot manually avoid the conflict.
But it should be no problem to put out a warning/error at runtime (or
maybe even at compile time) when a variable name clashes with a method name.

-- 
Thomas Wittek
http://gedankenkonstrukt.de/
Jabber: [EMAIL PROTECTED]

Reply via email to