Afaik, you shouldn't even be able to take the address of a property
That should generate an error.
Yes, I think so. When I testet it I didn't really expect it to work (though would be good). If there were such an error I wouldn't have asked here.
In the same way as
gives an error.
Ah, I remember such a discussion here on the forum. And somehow can understand the reasoning (double access because of read plus write, while one could assume a single operation?). But I think it would come handy and make properties much more useful. For the outside of the class it would behave just like a regular variable. Because of the restriction I cannot pass the property to a function, so I either have to explicitely call the property (i.e. hard code it), or pass setters and getters, which is more effort to implement. Instead the compiler should just do its magic~
A getter would need a call. So asm is required. You can't bluntly substitute an address with a call.
I see your point, the compiler (or the generated code) can't really know that the pointer address in the moment of dereferencing is pointing on a property instead of a plain variable. Perhaps a special property pointer would be needed. But yes, ...
pSth: ^Property of Integer;
(just a joke)
The implication of this is
a bit difficult to grasp