@property - take it behind the woodshed and shoot it?

Mehrdad wfunction at hotmail.com
Fri Jan 25 22:06:58 PST 2013


On Saturday, 26 January 2013 at 05:39:05 UTC, Walter Bright wrote:
> On 1/25/2013 2:14 PM, Jonathan M Davis wrote:
>> A property function is fundamentally different from a
>> normal function by its very nature, not just by its call 
>> syntax.
>
> I would have agreed with you on that for years, simply taking 
> its veracity as an axiom, but lately I am not convinced at all 
> of that assertion. I suspect the differences between a 
> property, field, and method are purely contrivance.
>
> For example, even accessing a global variable isn't 
> straightforward, if you look under the hood. If it's in a DLL 
> or TLS, there may be a function call in there that is 
> non-trivial.



Walter, that's not how TLS variables are generally implemented in 
C/C++.

They're *normal* variables, placed in a special section of the 
executable, which is automatically switched in and out on every 
context switch by the OS.

This is true on Windows, and I believe in Linux as well 
(http://stackoverflow.com/questions/2459692)


More information about the Digitalmars-d mailing list