property / getProperty() / setProperty()

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Aug 1 08:58:01 PDT 2009


On Sat, Aug 1, 2009 at 11:54 AM, Andrei
Alexandrescu<SeeWebsiteForEmail at erdani.org> wrote:
> Jarrett Billingsley wrote:
>>
>> On Sat, Aug 1, 2009 at 11:42 AM, Jarrett
>> Billingsley<jarrett.billingsley at gmail.com> wrote:
>>>
>>> On Sat, Aug 1, 2009 at 11:31 AM, Andrei
>>> Alexandrescu<SeeWebsiteForEmail at erdani.org> wrote:
>>>
>>>>> To avoid converting to unicode upercase, we could use "get_thing" and
>>>>> "set_thing" (nicer than opGet/opSet), although that doesn't really fit
>>>>> with
>>>>> the coding standards of D.
>>>>
>>>> Also, again, if you want to define "_thing" you'd have to write
>>>> "get__thing"
>>>> and "set__thing". Maybe we could lift the restriction about two
>>>> underscores
>>>> and only keep it for two leading underscores.
>>>
>>> I'm pretty sure that's what the restriction is now (no leading double
>>> underscores).  I don't think a__b is reserved.
>>>
>>
>> It is.
>> "Identifiers starting with __ (two underscores) are reserved."
>
> Thanks. So it looks like get_property() and set_property() could fly. How
> does that sound?

See my other reply.



More information about the Digitalmars-d mailing list