www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Will the PhotoObject DIP depercated the old Object class?

reply 12345swordy <alexanderheistermann gmail.com> writes:
I am asking this, because if true then the DIP that I am 
currently working on has been render obsolete as I have taken the 
old Object class into account when writing this.

-Alexander
Jul 24 2018
next sibling parent reply Seb <seb wilzba.ch> writes:
On Tuesday, 24 July 2018 at 20:25:33 UTC, 12345swordy wrote:
 I am asking this, because if true then the DIP that I am 
 currently working on has been render obsolete as I have taken 
 the old Object class into account when writing this.

 -Alexander
It's called ProtoObject and "deprecated". And no, while many of us want this, it would lead to too much breakage and there is no easy transition path.
Jul 24 2018
parent 12345swordy <alexanderheistermann gmail.com> writes:
On Tuesday, 24 July 2018 at 21:09:36 UTC, Seb wrote:
 On Tuesday, 24 July 2018 at 20:25:33 UTC, 12345swordy wrote:
 I am asking this, because if true then the DIP that I am 
 currently working on has been render obsolete as I have taken 
 the old Object class into account when writing this.

 -Alexander
It's called ProtoObject and "deprecated".
I blame my spell checker ;p
 And no, while many of us want this, it would lead to too much 
 breakage and there is no easy transition path.
Thank you! -Alexander
Jul 24 2018
prev sibling parent reply Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Tuesday, July 24, 2018 20:25:33 12345swordy via Digitalmars-d wrote:
 I am asking this, because if true then the DIP that I am
 currently working on has been render obsolete as I have taken the
 old Object class into account when writing this.
It is not the plan to deprecate Object (nice as that would be), but if you're writing a DIP that specifically targets Object, then you may want to rethink it. It will continue to exist, but it's likely that its use will be discouraged, and regardless, whatever you're proposing will have to take into account that many classes will have nothing to do with Object (though that's actually already possible thanks to extern(C++)). - Jonathan M Davis
Jul 24 2018
next sibling parent 12345swordy <alexanderheistermann gmail.com> writes:
On Tuesday, 24 July 2018 at 21:50:10 UTC, Jonathan M Davis wrote:
 On Tuesday, July 24, 2018 20:25:33 12345swordy via 
 Digitalmars-d wrote:
 I am asking this, because if true then the DIP that I am 
 currently working on has been render obsolete as I have taken 
 the old Object class into account when writing this.
It is not the plan to deprecate Object (nice as that would be), but if you're writing a DIP that specifically targets Object, then you may want to rethink it. It will continue to exist, but it's likely that its use will be discouraged, and regardless, whatever you're proposing will have to take into account that many classes will have nothing to do with Object (though that's actually already possible thanks to extern(C++)). - Jonathan M Davis
This is the DIP that I am working on: https://github.com/dlang/DIPs/pull/120 It involves attributes regarding the ~this() function. ProtoObject have been suggested a solution to this. Though as you said, not many class will be guarantee to have object or ProtoObject involved. I view my DIP as a simple type checker for destroy while I think that the ProtoObject as a type enforcer for classes. -Alexander
Jul 24 2018
prev sibling parent Steven Schveighoffer <schveiguy gmail.com> writes:
On 7/24/18 5:50 PM, Jonathan M Davis wrote:
 On Tuesday, July 24, 2018 20:25:33 12345swordy via Digitalmars-d wrote:
 I am asking this, because if true then the DIP that I am
 currently working on has been render obsolete as I have taken the
 old Object class into account when writing this.
It is not the plan to deprecate Object (nice as that would be), but if you're writing a DIP that specifically targets Object, then you may want to rethink it. It will continue to exist, but it's likely that its use will be discouraged, and regardless, whatever you're proposing will have to take into account that many classes will have nothing to do with Object (though that's actually already possible thanks to extern(C++)).
Well, I would expect that it's possible at some point to deprecate the *default* base being Object. that is, currently you do not have to type your class as: class C : Object But you would have to type your ProtoObject based class as: class C : ProtoObject We could easily deprecate the default (require people to specify the base), and then at some point remove the requirement for ProtoObject. But I wouldn't expect it to happen for years. Probably after much frustration of having to remember the ProtoObject base specification. -Steve
Aug 02 2018