OOP framework

Discuss any general programming issues here
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: OOP framework

Post by asrael »

Can you add some examples how that is used?
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: OOP framework

Post by SamuraiCrow »

That's coming. Unit tests are coming as well.
I'm on registered MorphOS using FlowStudio.
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: OOP framework

Post by SamuraiCrow »

UPDATE: Bugfixes implemented at the above link to GitHub.

Question:
What do people think about me leaving constructors out of the class.hws file? Most people I know of in C++ use the default constructor in a "factory method" anyway because it's faster and more flexible. Is there any advantage at all to having custom constructors that defining a factory method wouldn't?

Partial answer:
Since neither Hollywood nor Objective C uses name mangling that I can tell, there will be namespace collisions if I name every constructor the same as its outer class structure. Also, if I embrace the AmigaE style of constructor (giving each a unique name), it's basically just a less-flexible factory method anyway.
I'm on registered MorphOS using FlowStudio.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: OOP framework

Post by Bugala »

Article that might be worth reading, or then not.

https://medium.com/@cscalfani/goodbye-o ... 9cda4c0e53
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: OOP framework

Post by SamuraiCrow »

Thanks, Bugala! I'm only including single inheritance for framework compatibility but emphasizing interface inheritance as the main expansion. Good article though.
I'm on registered MorphOS using FlowStudio.
asrael
Posts: 31
Joined: Mon Jul 23, 2018 6:57 pm

Re: OOP framework

Post by asrael »

Bugala wrote: Sun Sep 16, 2018 12:55 pm Article that might be worth reading, or then not.

https://medium.com/@cscalfani/goodbye-o ... 9cda4c0e53
Neither OO nor FP is the magic bullet.
And then OO is not equal to OO. There are many additional concepts and implementations which try to eliminate the weak spots of OO.
FP is there even longer than OO and it hasn't saved us either.


Manfred
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: OOP framework

Post by Bugala »

There was actually one good comment by reader after that article which basically pointed out that when using OO correctly, it works where it works, and when using FP correctly, it works where it works. So neither is a solution for all, but both are a solution somewhere.
Post Reply