<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">pon., 3 wrz 2018 o 09:15 Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com" target="_blank">ryan@thealchemistguild.com</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
To summarize what I said last time was that I wanted a way to include “with” statement functionality in classes and records to aid in delegation patterns (in leu of multiple inheritance in Pascal). As it turns out the idea is relevant to management operators and something similar using properties was requested by the developer of management operators (Maciej).<br>
<br>
He suggested a “default” property which would basically delegate methods/field calls to another class so to avoid having to do things like "obj._.Free” which would be shorted to “obj.Free” because the field “_” is default. As he pointed out if such a default property existed I could leverage management operators to auto manage objects instead of adding anything more to the compiler like I did in my version. That’s a really important advancement for FPC and I’m personally very motivated in seeing this manifest in the language.<br></blockquote><div><br></div><div>you can always track my work on NewPascal and prepare/extract patch for FPC. The existing implementation of "default field" can be partially used for "default property 
 without indexers" implementation (small note: the part of storing info for ppu for default field is really lame and should be done in other way - but works :P - this was one of my first work for compiler and should be reworked). <br></div><div><br></div><div>Please note that multiply default property is not best idea.<br></div><div><br></div><div>You can always wait for my implementation because I am working on this (in free time, feature rather expected at the end of year) and you can extract patch and submit to FPC (or create your own earlier if you wish). "Default field without indexer" will be needed for Delphi compatibility sooner or later (especially for nullable types).<br></div></div>-- <br><div dir="ltr" class="gmail-m_3819522601919527876gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div></div></div></div>