Newbie initial comments on D language - scope

Janice Caron caron800 at googlemail.com
Tue Feb 5 23:25:20 PST 2008


On 06/02/2008, Edward Diener <eddielee_no_spam_here at tropicsoft.com> wrote:
> pb being a 'scope' object does not matter and its reference count does
> not get adjusted downward just because its object reference is assigned
> to another object.

You're right. That was a mistake. I meant

>             atomic { if (--pa->refCount == 0) delete pa; }
>             atomic { ++pb->refCount; }

The reference count of the value previously held by a /does/ get
adjusted downwards. I wrote the last post without paying attention to
the details, but the complexity doesn't go away when you write it
properly. Honest.


> So you can throw out a good
> deal of your imagined code above.

and replace it with correct code which is just as complicated, yes.


> You would no doubt claim that even if your code above were correct and
> much simpler.

*NEVER* tell me what you think I would or would not claim. Only I get
to speak for me. If anyone else does it, I start calling strawman.
Quote me verbatim by all means, but /do not/ put words into my mouth.


> As soon as people are against an idea they find the
> necessary reasons to denigrate it based on such spurious thought.

Are you implying that I, personally, am guilty of "finding reasons to
denigrate" your idea because of "spurious thought". I ask because you
use the generic word "people", but the context of your sentence could
be taken to imply that you are talking about me, personally. Please
clarify. I don't take well to personal attacks.


> In
> computer programming the favorite claim for such thought is always the
> logic and supposed overhead of implementing anything.

I speak from experience. I have implemented reference counting in a
multithreaded environment. I have earned the right to discuss
implementation details, and to explain what the /actual/ (not
supposed) overhead really is.



More information about the Digitalmars-d mailing list