Fixing const arrays

torhu no at spam.invalid
Mon Dec 12 17:50:18 PST 2011


On 13.12.2011 02:39, Jonathan M Davis wrote:
> On Tuesday, December 13, 2011 02:28:29 torhu wrote:
>> It's actually not 'save' being a noun that's the problem. I just
>> thought of a counter-example:
>>
>> --- struct Foo { // the data Bar data[];
>>
>> // save data on shutdown? @property bool save() { return save_; }
>> @property bool save(bool shouldShave) { return save_ = shouldSave;
>> }
>>
>> private: bool save_; } --- Not meant to be a realistic example, but
>> save is fine as a property here.
>
> You can pretty much always come up with another function with a
> completely different purpose wit the same name.
>
> Personally, the _only_ issue that I have with save is the fact that
> it's a property. The name save works well enough, and I can't think
> of anything that's better.

Yes, that's my opinion too.


More information about the Digitalmars-d mailing list