<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 03/05/2024 14:17, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB8fvxxWiPP5eZpfCovBv3Rw2X2et5OCpLb_mPRn-W3AtQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Martin Frb via fpc-devel
<<a href="mailto:fpc-devel@lists.freepascal.org"
moz-do-not-send="true" class="moz-txt-link-freetext">fpc-devel@lists.freepascal.org</a>>
schrieb am Fr., 3. Mai 2024, 12:13:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In
case it goes ahead, I am trying to thing of what would be
needed....<br>
Can anyone think of any feature for Pascal properties that
is not <br>
covered by the below?<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">A property can be marked "default". Currently
only array properties, but there is still the idea to
implement "hoisting" of sub members through single properties.
<br>
</div>
</div>
</blockquote>
Right. I will add a "default" flag.<br>
<br>
Out of interest (I recall having seen the discussion, but I don't
recall the details), how would that be accessed?<br>
a := MyObj; // will a be assigned the object or the default
properties value?<br>
<br>
<br>
Will that also mean multiple default properties, if the index
signature differs?<br>
<br>
<br>
<blockquote type="cite"
cite="mid:CAFMUeB8fvxxWiPP5eZpfCovBv3Rw2X2et5OCpLb_mPRn-W3AtQ@mail.gmail.com">
<div dir="auto"><br>
<div dir="auto">Properties of type interface or class can have
an "implements" clause that redirects the implementation of an
interface implemented by the class (note: class type
properties are not yet supported by FPC, but are on the ToDo
list for Delphi compatibility). </div>
<div dir="auto"><br>
</div>
</div>
</blockquote>
Right. Is that relevant for the debugger though?<br>
<br>
Or would that be the other way round? I.e. if we implemented debug
info for interfaces, then an interface would in the debug info be a
structure with lots of functions.<br>
Those functions then point to the correct functions in the object. <br>
And through the self param, would reveal the object, or in this case
the "implements" interface as object (allowing the debugger to
forward resolve).<br>
<br>
Actually, I don't think that the class debug info even includes
which interfaces the class implements?<br>
<br>
The Borland extension seems to have had it:
<a class="moz-txt-link-freetext" href="https://github.com/llvm-mirror/llvm/blob/master/include/llvm/BinaryFormat/Dwarf.def#L390">https://github.com/llvm-mirror/llvm/blob/master/include/llvm/BinaryFormat/Dwarf.def#L390</a><br>
<br>
<br>
<blockquote type="cite"
cite="mid:CAFMUeB8fvxxWiPP5eZpfCovBv3Rw2X2et5OCpLb_mPRn-W3AtQ@mail.gmail.com">
<div dir="auto">
<div dir="auto">Oxygene introduced per setter/getter visibility
and since I had need of this here and then in the past I might
still be inclined to implement that in the future, so this
might not only be for C# then.</div>
<br>
</div>
</blockquote>
<br>
Good to know, I will amend that.<br>
<br>
-------------<br>
I was also thinking if it might help to have a link to an inherited
property, if only visibility is changed. <br>
But that does not exist for functions either (though actually
indirectly yes, through the vmt pointer).<br>
<br>
That way the debugger could use that to avoid double listing it.<br>
<br>
E.g. currently there is already the problem that with "strict
private" (or private across units) an object can have several fields
"MyField". Of the same or different type. (which I still haven't
100% dealt with in fpdebug).<br>
With fields though, they are always different. With properties they
may be a newly introduced, or a visibility change. But then the
absence of any setter/getter would indicate that too. <br>
</body>
</html>