3 ms·
Oooh, good question. I certainly don't have a definitive answer. My current preference is to have a few atomic composable methods in a vocabulary. If I find mys
by LogicHoleFlaw 18y ago
Oooh, good question. I certainly don't have a definitive answer. My current preference is to have a few atomic composable methods in a vocabulary. If I find myself using a specific compositional idiom enough that it needs its own name, I create a new method and factor out that idiom. I use this strategy when writing libraries for my own use.
When distributing to others there are more concerns in play. In a language like Java where 3rd party libraries are frozen from the perspective of the developer a rich vocabulary is a helpful thing. In Ruby, open classes make it much easier for the developer to add things on their own. Lua aspires to minimalism; its standard libary is very small and atomic. Lisp is a very compositional language so I would lean towards exposing only the key concepts of a library. These are all valid approaches in their spheres.