D1 -> D2
Walter Bright
newshound2 at digitalmars.com
Thu Nov 18 14:10:52 PST 2010
Andrei Alexandrescu wrote:
> On 11/18/10 1:50 PM, Michel Fortin wrote:
>> On 2010-11-18 16:02:40 -0500, "Steven Schveighoffer"
>> <schveiguy at yahoo.com> said:
>>
>>> class obj
>>> {
>>> char[] name;
>>> this(char[] name) { this.name = name;}
>>> }
>>>
>>> What to do there?
I agree that it just seems like good class design to have obj.name be immutable,
and pass the responsibility for making it so up the call chain to the constructor.
More information about the Digitalmars-d
mailing list