Hallo Sebastian!
Antwort auf eine Message von Sebastian Nozzi an todos:
SN> I think it is terrific, and therefore constructors and destructors
SN> should be private. I don't know. What do you think?
but then you should think about how to construct a new object and destroy it.
eq:
class Foo
{
public:
Foo * make(arglist) { return new Foo (arglist);}
void destroy(Foo *) ....
ok. in this case you habe to assert, that noone destroys an already destroyed
object.
PS: the problem you are talking about is a semantic problem. maybe its a ok
for some classes to be "reconstructed". and maybe its a bug to stop all
enginges, when the airplance is 10.000m above the ground.
eq:
class plane
...
stopEnginges()
so, i would suggest to ASSERT some conditions as long as you not compile your
code for public shipment.
something that the programming Language EIFFEL calls in/out conditions for
members.
Servus, Mario!
--- FleetStreet 1.21 PR#2
---------------
* Origin: LC/32 Development Team, http://www.kirchnersoft.com (2:310/14.11)
|