Discussion on static reflection syntax in C++

Stefan Koch uplink.coder at googlemail.com
Tue Feb 23 16:44:38 UTC 2021


On Tuesday, 23 February 2021 at 15:13:18 UTC, Stefan Koch wrote:
> On Tuesday, 23 February 2021 at 15:04:46 UTC, IGotD- wrote:
>> On Tuesday, 23 February 2021 at 13:58:34 UTC, Stefan Koch 
>> wrote:
>>>
>>> If they play their cards right and integrate their meta-info 
>>> properly with constexpr it's going to beat D.
>>
>> Can you explain further why it is going to beat D (I assume in 
>> terms of functionality, not aesthetics).
>
> Because the conversion to reflection values meta::info or 
> whatever it was called happens inside the compiler.
> It's not shackled to templates.
>
> And therefore they can have very fast generation of these 
> without inuring recursive evluate-semantic() function calls.

Actually I take that back.
I should have looked more closely.
They have polymorphic expressions (changing the static type) 
which means they can only use those within polymorphic contexts 
... which does shackle them to templates again.


More information about the Digitalmars-d mailing list