<div dir="auto">Hi List,<div dir="auto"><br></div><div dir="auto">The Forth and Lisp upbringing in me is wanting to create more methods that do fewer things each. So I was curious what seasoned Smalltalkers have to say. Do you like more littles or fewer bigs?</div><div dir="auto"><br></div><div dir="auto">For those not familiar, in Forth and Lisps function calls are free, so it makes not a lot of difference if you write 10 1-statement functions that call the next in line, or 1 10-statement function that does it all, broken up roughly by the amount you can comprehend without pretty-printing and commenting.</div><div dir="auto"><br></div><div dir="auto">Here are my thoughts:</div><div dir="auto"><br></div><div dir="auto">Obviously, a reason not to do so is the need to come up with all those names for "1 method for 1 action", but I use noweb outside of Squeak so I've gotten pretty good at that.</div><div dir="auto"><br></div><div dir="auto">Another would be a performance penalty of having to do a method lookup more often.</div><div dir="auto"><br></div><div dir="auto">For pros, the most apparent is making more points where the process can be inherited and uninherited. Give a name to "check index is a member of the contents" and a subclass can say "I do this one part faster than my superclass!" without copy-pasting the entire thing.</div><div dir="auto"><br></div><div dir="auto">You could also use tail calls so you don't waste call stack. I see this already happens in a few places like PackagePaneBrowser, where implementation bounces between it and Browser.</div><div dir="auto"><br></div><div dir="auto">For unknowns, there's the director method, which specifies the names of each step and the order they happen, and the chain method, where each method specifies what the next step is.</div><div dir="auto"><br></div><div dir="auto">Director is the best method. It offers a clear specification of the steps that need to happen and offers room for extra steps in between. It also organizes your thoughts in one place for later reading.</div><div dir="auto"><br></div><div dir="auto">Chain is the best method. It allows a subclass to override the default specification at an arbitrary point without needing to stub out steps in the process that aren't applicable. It also doesn't waste methods if you can short-circuit an operation.</div></div>