Possible @property compromise
1100110
0b1100110 at gmail.com
Wed Jan 30 13:26:32 PST 2013
On 01/30/2013 09:10 AM, Jacob Carlborg wrote:
> On 2013-01-30 02:40, TommiT wrote:
>
>> I always thought that having public member variables is a bad style of
>> programming because of the lack of encapsulation. So, if there's a
>> language feature that enables you to write public member variables, and
>> later on, replace them with property functions, wouldn't that mean that
>> the language is encouraging this particular kind of bad style of
>> programming?
>
> I really don't see much point in properties/methods that just forwards
> to an instance variable.
>
Me either.
I mean yes, for anything that is part of a public api you should
probably double check everything. But insisting on getters and setters
regardless of the requirements of what you are getting and setting?
Sounds like an excuse to not think, to me.
More information about the Digitalmars-d
mailing list