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

Mehrdad wfunction at hotmail.com
Fri Jan 25 23:52:26 PST 2013


On Saturday, 26 January 2013 at 07:25:24 UTC, Walter Bright wrote:
> On 1/25/2013 10:06 PM, Mehrdad wrote:
>> Walter, that's not how TLS variables are generally implemented 
>> in C/C++.
>
> Since I implemented them, I know how they work.

I wasn't being pedantic. That's why I said generally, not always.
Obviously you can implement things a million different ways...


>> 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 not necessarily true at all. It isn't for OSX, for 
> example, and there's nothing in the semantics of TLS which 
> preclude calling a function.


Again, I didn't say they're "necessarily" true either, hence why 
I mentioned Linux and Windows specifically.
OS X is really the odd one out here, not Windows or Linux.


But you missed my point, which was, yes, a lot of things COULD 
contain function calls. Even the two lines

	int i = 0;
	i++;

COULD contain a function call, but how is that in any shape or 
form relevant to the discussion about @property in any way?


Generally, it isn't a function call, and as far as the code is 
concerned, it isn't a function call.

The fact that you may have happened to implement something as a 
function call doesn't mean anything with regards to the 
difference between a function call and a direct access for the 
_programmer_.


More information about the Digitalmars-d mailing list