waseem18 / node-rake

A NodeJS implementation of the Rapid Automatic Keyword Extraction algorithm.
http://www.thabraze.me/node-rake/
MIT License
100 stars 20 forks source link

Composition over inheritance #12

Closed icaroponce closed 7 years ago

icaroponce commented 7 years ago

Hi,

I'd like to suggest a small but important change in the code design. I believe that using a more functional-programming-like approach over OOP in small modules like this might give us more flexibility, simplicity and code legibility.

Additional reasons and explanation you find in the links below:

https://medium.com/@kentcdodds/classes-complexity-and-functional-programming-a8dd86903747 https://www.youtube.com/watch?v=wfMtDGfHWpA

It's important to notice that this design change wouldn't introduce any breaking changes to the project.

Thanks.