<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ryan Joseph via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 17. Feb. 2021, 02:15:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Feb 16, 2021, at 2:43 PM, Sven Barth via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-pascal@lists.freepascal.org</a>> wrote:<br>
> <br>
> FPC currently does not yet support class types not to mention records and objects which is what I had mentioned earlier already.<br>
<br>
Yes I see this on <a href="https://freepascal.org/docs-html/ref/refse47.html" rel="noreferrer noreferrer" target="_blank">https://freepascal.org/docs-html/ref/refse47.html</a>. Why isn't this supported? I guess as part of this proposal we need to implement this feature as well? I'm not familiar with this area of the language so I'm not sure what this entails.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Simply because no one has come around to implement it yet. The class type case is more complicated than the interface case. (Same would be true for record and objects)</div><div dir="auto">So, yes, we'll need to implement this first which would finally bring FPC up to Delphi compatibility regarding interface delegation. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> <br>
>> It's a strange syntax compared to anything else we allow in classes and the boiler plate is really adding up now. "procedure Draw" is going to be in 4 lines now!<br>
>> <br>
>> It would be nicer if they made this into one line so we don't have yet another set of duplicate method signatures, i.e.:<br>
>> <br>
>> procedure Draw as ICircle.Draw;<br>
> <br>
> I can't shake the feeling that all you complain about is writing even a little bit too much. Pascal is *not* about using as less code as possible, but to be as correct as possible and the syntax of interface delegation allows exactly that.<br>
<br>
Being too verbose is clunky in my opinion. That method resolution syntax is just kind of an odd addition for classes to my eyes. "procedure Type.Name = Name;" doesn't have any precedence inside classes/records so it stands out.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Again, the syntax is much more powerful than what you suggested. Also it's the existing syntax and not something new. Not to mention that it only needs to be used if you need to implement a method yourself. </div><div dir="auto">Iff(!) we find out down the line once we have the basic functionality working, that people are struggling with this, we can still think about improving something, but for now I'd prefer to add as less new syntaxes as possible (especially if a syntax that does provide this exact functionality *does* exist already, no matter if it's too verbose for some). </div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>