Automatically call constructors and destructors

Registered by Stan Lagun

Currently class constructors (initialize) and destructors (destroy) behave like ordinary methods. If derived class has its own constructor then it overrides parent class constructor. If derived class doesn't explicitly calls base class constructor then it never gets initialized while its methods can be called. Even if it does constructor can be run more than one time in case of diamond-diagram multiple inheritance or because child class explicitly called it several times. It is proposed to consider these methods as special methods that are invoked automatically by engine in appropriate order (base class first for constructor, reverse order for destructors, similar to how it is in C++). Explicit calls to these methods should result in no-op with deprecation warning and be forbidden in the future

Blueprint information

Status:
Complete
Approver:
Ruslan Kamaldinov
Priority:
Low
Drafter:
Stan Lagun
Direction:
Needs approval
Assignee:
Stan Lagun
Definition:
Review
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
Stan Lagun
Completed by
Ruslan Kamaldinov

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/muranopl-auto-call-init-destroy,n,z

Addressed by: https://review.openstack.org/98579
    Automatically call MuranoPL initialize/destroy methods

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.