Skip to content

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

Description

@dwiyatci

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions