On Mon, 12 Dec 2011 19:25:33 -0500, Mehrdad <[email protected]> wrote:
In every language I've seen that has "properties" (C#, Python), they are:- _Defined_ like methods - _Used_ like variables The trouble is, this isn't true with D.
Neither is it true (by your definition) in a lot of other languages (Ruby, Eiffel) which have properties. D originally implemented a concept called Methods-as-Properties, which in terms of paradigms lies somewhere between "properties" and the "Uniform access principle". This naturally caused a bunch of cognitive dissonance for people coming from C#/python, which lead to the introduction of @property. Originally, @property and MaP were suppose to co-exist. As this was a compromise, the property can-of-worms occasionally gets re-opened in these forums.
