I couple of possible problems with C++ just occured to me.

1. Constructors can not (AFAIK) fail except maybe by throwing an
exception. I wouldn't want to clutter parts of the code with
exceptions unless all error checking is based on exceptions so the
'new' operator would have to be overloaded to do exception handling
or some other ad hoc constructor failure checking. An alternative
would be to stick to the current create_foobar and init_foobar
functions but then we start losing some of the advantages of C++.
This is related to the second problem:

2. Is it possible to pass the necessary information to a function to
create (with new) an arbitrary object with a known type of constructor
or is a create_foobar callback function still needed? (See e.g.
region_add_managed_new.)

Yeah, I could probably find answers to these questions on the web, but
I'm lazy :).

-- 
Tuomo

Reply via email to