Date: Thu, 15 Feb 2024 12:02:47 +0200
On Thu, 15 Feb 2024 at 03:03, Robin Rowe via SG14 <sg14_at_[hidden]> wrote:
> Instead of making external pre-compiler code generator tools better
> supported by adding [[attributes]], would it be better to consider
> making C++ more complete, so mutually incompatible pre-compiler tools
> are unnecessary?
>
> I'm imagining a new keyword 'property' that does the magic that is
> presently handled by various proprietary pre-compilers.
I'm imagining that once we have reflection and injection, we can write a
std::property<T> that then generates the code that the external tools
generate today.
> FYI, the Q_OBJECT macro:
>
> If I understand what this is doing, C++ calls in any thread are queued
> and forwarded for processing by the GUI thread so UI interactivity is
> smooth.
The calls go to the thread associated with the target object. That
thread need not be the GUI thread.
> Thoughts on a 'property' keyword to replace above hacks?
The thoughts are in the beginning of this response, make reflection
and injection work, and you don't
need a keyword, you can write library facilities that implement
properties with whatever support functionality
being injected to do what the code generators do.
> Instead of making external pre-compiler code generator tools better
> supported by adding [[attributes]], would it be better to consider
> making C++ more complete, so mutually incompatible pre-compiler tools
> are unnecessary?
>
> I'm imagining a new keyword 'property' that does the magic that is
> presently handled by various proprietary pre-compilers.
I'm imagining that once we have reflection and injection, we can write a
std::property<T> that then generates the code that the external tools
generate today.
> FYI, the Q_OBJECT macro:
>
> If I understand what this is doing, C++ calls in any thread are queued
> and forwarded for processing by the GUI thread so UI interactivity is
> smooth.
The calls go to the thread associated with the target object. That
thread need not be the GUI thread.
> Thoughts on a 'property' keyword to replace above hacks?
The thoughts are in the beginning of this response, make reflection
and injection work, and you don't
need a keyword, you can write library facilities that implement
properties with whatever support functionality
being injected to do what the code generators do.
Received on 2024-02-15 10:03:00