Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
July 24, 2018 Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
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 |
July 24, 2018 Re: Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 12345swordy | 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.
|
July 24, 2018 Re: Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | 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 |
July 24, 2018 Re: Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 12345swordy | 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
|
July 24, 2018 Re: Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | 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 |
August 02, 2018 Re: Will the PhotoObject DIP depercated the old Object class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | 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
|
Copyright © 1999-2021 by the D Language Foundation