roxen.lists.pike.general

Subject Author Date
Re: MutexKeys, garbage collectors, destructors and optimisers Stephen R. van den Berg <srb[at]cuci[dot]nl> 04-02-2009
Martin Stjernholm wrote:
>refs you still have to do refcounting. The gain is to be had when you
>can delay both destruct and free to a later time, when the gc can do
>it efficiently.

>The main complication here is to handle exceptions.

>Your parallell to C++ is a bit flawed since you compare an object
>allocated in the heap to one on the stack. By the nature of the Pike

Valid points.
Ok, then we get back to syntax.
It would be either:
a. A block construct as you propose.
b. A modifier to the declaration of the variable.
c. A property of the destructor of the class.

(c) is nicest, but changes it into a runtime check, which is bad for
optimising.
(b) is the most C like, but requires yet another reserved word.
So most likely, (a) is the only option.
-- 
Sincerely,
           Stephen R. van den Berg.
Humor in the Court:  Q: What happened then?  A: He told me, he says,
"I have to kill you because you can identify me."  Q: Did he kill you?  A: No.