[fpc-devel] "Default" discussion for SmartPointers etc
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Jul 27 16:58:53 CEST 2016
Michael Van Canneyt wrote on Wed, 27 Jul 2016:
> On Wed, 27 Jul 2016, Jonas Maebe wrote:
>
>> Michael Van Canneyt wrote on Wed, 27 Jul 2016:
>>
>>> Why not introduce an address operator ?
>>>
>>> operator @ (T : MyType) : Pointer;
>>
>> It's only needed because Maciej wants the proxy type to behave
>> differently from all other existing types. The solution is not to
>> add functionality to make that easier, but to fix the
>> inconsistencies.
>
> Then I didn't understand what exactly you think is inconsistent ?
The need for a special behaviour of the "@" operator: to return not
the address of the proxy object, but the address of the proxied
object. That is different compared to the behaviour of the @-operator
on any other type (except for procvars in TP/Delphi-mode, but that is
an inconsistency we can't do much about).
> Knowing the purpose, what do you think can be done ?
I wrote some ideas in the original email you replied to.
Jonas
More information about the fpc-devel
mailing list