Thomas Schwinge <tho...@codesourcery.com> skribis:

> The next thought then occurred to me: why not use a programming language
> that allows for defining additional types, powerful enough to model the
> desired semantics?  For example, if we'd compile the Hurd with a C++
> compiler (which, hopefully, will just work -- mostly), could we then
> create a mach_port_ta C++ class, wrapping the "primitive" Mach data type,
> and teach that one the Mach API semantics?

Indeed, for automatic variables, C++ destructors are the same thing as
the ‘cleanup’ attribute, so that would work too.

Ludo’.

Reply via email to