the annoying, verbose self
Colin J. Williams
cjw at sympatico.ca
Thu Nov 22 09:08:14 EST 2007
bearophileHUGS at lycos.com wrote:
> Alexy:
>> Sometimes I
>> avoid OO just not to deal with its verbosity. In fact, I try to use
>> Ruby anywhere speed is not crucial especially for @ prefix is better-
>> looking than self.
>
> Ruby speed will increase, don't worry, as more people will use it.
>
> Bye,
> bearophile
I don't see this as a big deal, but
suppose that the syntax were
expanded so that, in a method, a dot
".", as a precursor to an identifier,
was treated as "self." is currently treated?
References to the instance itself would
continue to use "self". A lonely
dot would get lost on the page.
Initially, this form could be treated as
an alternative, usage would
determine its fate. Thus "self.name" or
".name" would identify the same
object.
Colin W.
More information about the Python-list
mailing list