I advocate modularity, for sure.
I am confused on the 12 libraries you speak about.
I recently started making a support lib for all things utility, like a CHAIN function, a safepairs function, etc...
I also made another lib for UI supports, such as libaddonmenu but for main Window controls.
To me there are maybe one or two others before you start getting to the point of too many libraries versus an actual job for an addon.
like your attachment example, that sounds like an addon, not something that should be in a module. perhaps if the attachment function isa little complex, a generic way to attach controls, but that already exists with setanchor, so why redo the work?
an example of something I would put intoa library is a recursive version of getnamedchild or getchildren.
|