lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Naming question for get_property, set_property


From: David Kastrup
Subject: Re: Naming question for get_property, set_property
Date: Wed, 12 Feb 2020 11:29:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Tue, Feb 11, 2020 at 10:17 PM David Kastrup <address@hidden> wrote:
>
>> > the reason being that it is better if the source code looks like plain
>> C++,
>> > even though they might actually be macros that do advanced magic. Having
>> > normal looking source code helps editors and tooling (astyle,
>> clang-format)
>> > make sensible decisions.
>>
>> get_property (pointer, "property")
>> set_property (pointer, "property", value);
>>
>> would achieve that as well.  Doesn't look like a member function, but
>> the thing looking like a member function also never actually was one.
>>
>>
> Earlier you said:
>
> "and for "reasons" I
> need to know the type, so the call would become something akin to"
>
> how does this work for the above?

decltype (*(pointer))

Basically the macro does not need to know the type by name, just in some
manner it can tell the compiler.

For the current syntax ->get_property ("property") I just have no
conceivable handle to get at the type of the pointer.

-- 
David Kastrup
My replies have a tendency to cause friction.  To help mitigating
damage, feel free to forward problematic posts to me adding a subject
like "timeout 1d" (for a suggested timeout of 1 day) or "offensive".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]