OOP framework
Re: OOP framework
Can you add some examples how that is used?
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: OOP framework
That's coming. Unit tests are coming as well.
I'm on registered MorphOS using FlowStudio.
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: OOP framework
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.
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.
Re: OOP framework
Article that might be worth reading, or then not.
https://medium.com/@cscalfani/goodbye-o ... 9cda4c0e53
https://medium.com/@cscalfani/goodbye-o ... 9cda4c0e53
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: OOP framework
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.
Re: OOP framework
Neither OO nor FP is the magic bullet.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
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
Re: OOP framework
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.