<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2016-07-26 21:59 GMT+02:00 Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-:4ou" class="gmail-a3s gmail-aXjCH gmail-m15628ca4046b3132">First of let me tell you that in essence and in general I'm in support<br>
of your "default" idea </div></blockquote></div><br>Not only you Sven ;) I found interesting comment by Allen Bauer, seems like "default" idea is right direction. Completely independent source. I didn't know before about this comment. Comment created in May 2015 strictly related to nullable types. My work starts in 2014 and "default" in my case was created for smart pointers and ARC objects :)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Additional note: IMO 'default' for fields is more powerful and together with default for non-indexed properties is awesome combo.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">=== begin quotation ===</div><div class="gmail_extra"><div class="gmail_extra">Current working theory of Nullable<T>.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Nullable<T> = record</div><div class="gmail_extra">...</div><div class="gmail_extra">property Value: T read FValue; default;</div><div class="gmail_extra">...</div><div class="gmail_extra">end;</div><div class="gmail_extra"><br></div><div class="gmail_extra">Using the default directive to "hoist" the operators of "T". Currently the default directive only works for array properties by "hoisting" the '[]' operator. Marking a non-array property with default will make the containing type behave as that type.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This, coupled with some intrinsic compiler knowledge of the Nullable<T> type will make Nullable<T> work without any addition of keywords or other standard functions or procedures.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Using the "default" directive on a non-array property will work for any type, except for having the null-propagation semantics.</div><div class="gmail_extra"><br></div><div class="gmail_extra">When considering language features, I try and not only make it work for the intended purpose, but also broaden reach of any supporting feature. In the above scenario, even user-defined operators on "T" will be properly hoisted and used.</div><div class="gmail_extra">=== end quotation ===</div></div><div class="gmail_extra"><div>source (one of last comments) : <a href="https://plus.google.com/u/0/+HoracioJoseCavalcantiFilho/posts/2vzP8sdF4f7">https://plus.google.com/u/0/+HoracioJoseCavalcantiFilho/posts/2vzP8sdF4f7</a></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards,<br>Maciej Izak</div></div></div>
</div></div>