Improved performance of chords creation for a specific key by creating functions instead of creating them on init#52
Conversation
… that only create the necessary
There was a problem hiding this comment.
I strongly recommend that these utility functions live outside the actual implementation of Key -- as these functions are not directly related to the actual data structure, they should live in a file called like Key+Extensions as they are utility/connivence functions
There was a problem hiding this comment.
Honestly, I'm unsure about proceeding with this because the overall style of the project typically consolidates all related business logic into a single file. Particularly considering that the functions for initially populating these values were also included in the same file, I would prefer to keep them where they are.
I transformed them from actual functions into computed variables; perhaps this is an improvement.
If you'd still like me to transfer them to a file, I can certainly do that. I don't mind at all.
There was a problem hiding this comment.
hmmm you are right, we probably need to have some style opinion, as that is mine, I like spectating nice utility functions into ...+Extensions files. Your additions LGTM and don't actually impact the underlying data structure so we should be good.
Lazy chord creation on type
Keyrelated to this #23