On 12/12/11 9:09 AM, torhu wrote:
On 12.12.2011 15:43, Andrei Alexandrescu wrote:
On 12/12/11 6:24 AM, torhu wrote:
save being a property is a stupid inconsistency.

I'm not so sure.

Andrei

Why? As far as I can tell, it's inconsistent with what properties are
used like in other programming languages.

Why?

Saving something is an action,
which to me is a different concept.

So if we called .save .state or .current things would be any different?

If it was called currentState
instead, that's what I'd call a property.

Ah. So now we're wasting time not on @property (as I'd predicted), but instead on what _names_ are suitable to work with it. I rest my case.

Making something a property gives it certain connotations that break
when it's called 'save'. That you can save the state of the range is a
property, if you will. But the action of doing so is not a property.
People are going to be surprised when save() doesn't compile. Isn't
there something called the principle of least surprise?

I think we should only worry about surprising the uninitiated with how poorly designed the whole @property thing is.


Andrei

Reply via email to