haleyhousellc / arboriculture

A simple tree library written in TypeScript.
https://haleyhousellc.github.io/arboriculture
ISC License
2 stars 0 forks source link

Revisit the OOP design. #14

Closed haleyga closed 6 years ago

haleyga commented 6 years ago

When this project was started, I was an enterprise .NET developer. Enterprise architecture (and all of its inheritance mumbo-jumbo) is palpable in my class design. This is not natural in JavaScript (more so in TypeScript, but is there really a difference?).

I propose refactoring to leverage composition rather than classical parent-child inheritance.

Thanks can go to @ericelliott for corrupting me ;).