On Tuesday, 29 January 2013 at 11:13:19 UTC, jerro wrote:
need to adopt the inferior C# approach.

And there is another problem with the "superior" D approach: a typing mistake in the name of a property might let you not with one property that is r/w, but with two properties to which one is r/o and the other is w/o.

More, those functions might be placed several screens far one from the other.

Even more, defining the properties as (regular) functions makes it very difficult to teach a programmer: "in this body of code you should restrain yourself from doing certain things", because he already feels that inside a function he shoiuld have a lot of freedom.

It would have been easier to say: "you know, property is like a variable, but you can also add there *some* instructions (ie: range checking, database interrogation, cache and so on)".

Reply via email to