Re: Reference Counted Class Please :)

From: Skybuck Flying (nospam_at_hotmail.com)
Date: 11/19/04


Date: Fri, 19 Nov 2004 08:48:16 +0100

Well if I designed my thing a little bit different all procedures would look
the same and then all objects would "implement" the same interface

and then I would not need the IS operator.

Though it would make my code a litttttle bit less easy to read.

And quite frankly I don't like the loss of this "is" operator functionality
or any other possible lost functionality...

just so that objects are reference counted.

No... then I rather choose for "reference hell"

And make sure that all added objects to the container are not referenced by
any others variables outside the container ;) just to avoid references to
destroyed objects... (the objects can be destroyed by the container when
some processing function is called ;) )

Well that was a short lived venture into interfaces hehehehe.

Besides cleaning up after yourself is good practice anyway :) it's just a
little bit less lazy... and maybe a little bit less efficient... though I
wonder... what if the content changes of an interfaced object... does it do
a copy on write like a string ? probably not ;)

So I would still have to do manual duplication...

So the only thing gained with interfaces is auto clean up... <- and in
general I do find this bad coding practices :) *** having an invalid
reference might be bad as well.

Gje :)

Bye,
  Skybuck.