On Tue, 21 Nov 2006, Hans Aberg wrote:

> On 21 Nov 2006, at 19:23, Joel E. Denny wrote:
> 
> > > As for my program, the parser builds dynamic iterated polymorphic
> > > objects,
> > > and in cmopbination with a reference count, that is very convenient.
> > 
> > I have programs that do this too.  Inside the union, pointers to non-POD's
> > work fine.
> 
> If you want to implement the cleanup by hand when you do not have to, that is
> fine with me, as long as I do not have to do it. :-)

I don't find the cleanup to be that tough especially now that we have 
per-type %destructor.  With the union, I find it convenient that some of 
my semantic types can be primitives, and I don't have to define a common 
base class for all semantic types.  

It's fine if you want to do it your way.  My point is simply that 
%destructor is useful for some grammars using the current C++ skeletons, 
and thus %destructor is not a C only feature.


Reply via email to