On 05/09/2010 04:21 PM, bearophile wrote:
Pelle:
Please, no. :)
Just require @property for assignment-is-a-call code.
Special cases are baaaad. They are usually not special enough.
Experience shows me that implicit operations or untidy semantics often leads to
big troubles, even when you don't see such troubles at first.
The obligatory usage of () makes the language a little less handy, but more
tidy, and removes a source of possible troubles.
There is already a @property syntax that can be used on methods and free
functions. Having another half-baked feature doesn't help the language.
Bye,
bearophile
Well, then I see no reason not to apply @property to almost every
function there is, if you can call it without arguments. Or, for array
functions, as a property of an array.
I mean, @property should be for properties, and if we define that not to
be something that can be read and written as a variable, I believe the
definition of what a property actually is will bikeshed us into oblivion.