Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Stamps vs Traits vs Mixins vs Has-a/Is-a composition vs Multiple inheritance (classes) feature-by-feature comparison #341

Open
dwiyatci opened this issue Apr 21, 2019 · 3 comments

Comments

@dwiyatci
Copy link
Contributor

dwiyatci commented Apr 21, 2019

It's been ¬5 years I've got acquainted with stamps, been visiting the GitHub repo and using them once in a while in my project. ;) That said, I still feel shaky/undecided sometimes whether it's the best approach out there to do composition in OOP. Okay, one of the "Fun with Stamps" articles claims that this could be the most superior:

Classic class-based OOP is rather limiting of what you can and cannot do with your classes. It has certain rules about how the inheritance works. They are set and unchangeable. TraitsJS and mixins are the same — more flexible though, but limited.

Stamps are free. No limits of what you can compose.

Yet, there is no clear feature-by-feature comparison between the contenders:

  • Stamps.
  • TraitsJS.
  • Mixins.
  • Has-a composition.
  • Is-a composition.
  • Multiple inheritance (classes)? Others?

I think it would be fascinating to see a fair and rather non-biased feature-by-feature comparison matrix/table (maybe like in https://webpack.js.org/comparison/ (?)) to mark a cool legacy in software engineering for the human race has ever been invented here.

Bless! :)

@koresar
Copy link
Member

koresar commented May 13, 2019

This is an amazing idea! I need some time to work this all out.
Thank you.

PS: feel free to drop more ideas.

@tmikaeld
Copy link

tmikaeld commented Jul 2, 2019

I've been reading Elliotts latest book and got interested in Composition and thus Stampit. I've been wanting to use it in projects but have a nagging feeling that I'll get into trouble, get locked in or not be able to find a solution to problems I might encounter in bigger projects.

I think this type of comparison would convert a lot of doubters, superb idea and really nicely formulated :-)

@StephaneTy-Pro
Copy link

Superb idea, really need those types of comparisons to better understand the whole thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants