in reply to Re: Thoughts on new 'class' OO in upcoming perl
in thread Thoughts on new 'class' OO in upcoming perl
Of course, if you prefer to return undef in that case, you can have that, too: All you need to know is that stuff you used to write in the body of new now goes into the ADJUST phaser.
How? How do you prevent your OO system from throwing in case a mandatory parameter is missing and convince it to return undef instead? How do you convince it to return undef from within an ADJUST whateverscifiweaponyoudecidetocallit?
Your attribute based constructor abort is very limited and while throwing an exception inside an ADJUST thingie would likely abort the constructor ... after wasting time and resources in the constructors and AJDUST lasers of the parent class(es) ... there doesn't seem to be a way to return undef.
Your OO system's new doesn't look like bless on steroids. It sounds more like bless overdosed with antidepressants.
Deciding when to call parent constructor?
If it's something an ADJUST block can fix SHOW US HOW!
Jenda
1984 was supposed to be a warning,
not a manual!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Thoughts on new 'class' OO in upcoming perl
by haj (Vicar) on Mar 18, 2023 at 21:13 UTC | |
by cavac (Prior) on Mar 20, 2023 at 21:03 UTC | |
by haj (Vicar) on Mar 20, 2023 at 22:01 UTC | |
by Jenda (Abbot) on Apr 10, 2023 at 11:20 UTC | |
Re^3: Thoughts on new 'class' OO in upcoming perl
by tobyink (Canon) on Mar 19, 2023 at 12:03 UTC | |
by Jenda (Abbot) on Apr 10, 2023 at 11:20 UTC | |
by tobyink (Canon) on Apr 10, 2023 at 15:14 UTC | |
by haj (Vicar) on Apr 10, 2023 at 21:11 UTC | |
by choroba (Cardinal) on Apr 10, 2023 at 22:03 UTC |