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. Saving something is an
action, which to me is a different concept. If it was called
currentState instead, that's what I'd call a property.
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?