D - New feature: intrinsic and extrinsic keywords
- Iliya Peregoudov (14/14) Sep 09 2001 As I understand D tries to be so self-documenting as it can. From
As I understand D tries to be so self-documenting as it can. From this point of view a new feature can be added: Type modifiers 'intrinsic' and 'extrinsic' can be used in instance variables declarations. Variables must be pointers or other data types implemented as pointers, for example, objects. This keywords clarify is the pointer points to intrinsic part of the object (ie. the part that have no sense without the object, that created with the object and destroyed when object is destroyed) or points to extrinsic object that have its own independent life time. Such modifiers can help compiler to generate correct default constructor and destructor, and deepcopy method (if there will be such a thing). They also can inform garbage collector that intrinsic instance variables have to be collected with the object. They also play a good documentation role :)
Sep 09 2001