[Dwarf-discuss] Proposal: Add support for "property" with getter/setter (based on Pascal properties)

Martin lists@mfriebe.de
Mon Oct 7 21:39:06 GMT 2024


On 07/10/2024 22:40, Augusto Noronha wrote:

> 
> Streaming as a language construct (and controlling whether a property should be streamable or not) seems like a pretty Pascal specific feature, maybe this could be a Pascal extension?

Or probably be moved to RTTI, of which I have not yet evaluated if it 
needs special DWARF support.

RTTI seems to exist in C++, but I haven't used it there myself. Also 
RTTI is in the end a structure of its own, and the most that DWARF may 
need if at all would be a pointer to it, but even that could be an 
artificial field.

"stored" only has a language constructs for defining it. Calling it is 
done via the fields in RTTI.

So, yes. "stored" can be dropped.


> 
> 
>> On Oct 7, 2024, at 2:23 AM, Martin via Dwarf-discuss <dwarf-discuss@lists.dwarfstd.org> wrote:
>>
>> On 04/10/2024 21:56, Augusto Noronha via Dwarf-discuss wrote:
>>> Hi Martin,
>>> Could you explain what a Pascal-style stored accessor is or link to a reference to it? I tried looking it up but couldn’t find anything relevant.
>>

I may just have done above.

There is a hidden field in the class that points to RTTI. And in RTTI 
there is a field "pointer to function".

So you would actually not find any code that directly calls that 
function (via any language construct).

I initially went only through how the property is defined, not how it is 
used.



More information about the Dwarf-discuss mailing list