[squeak-dev] The Trunk: ToolBuilder-Morphic-tpr.196.mcz

tim Rowledge tim at rowledge.org
Thu Oct 5 23:48:48 UTC 2017

The proper answer to this particular use or misuse (depending upon one’s tastes) would be to find out if the problematic case - the toolbuilder ever being asked to open a Morph - could ever actually occur. If it can’t then no problem at all. If it can, it would be best to fix it in the probably poorly designed sender.

Part of the generic aspect of the problem is a tendency to use very generic message names that end up giving far too little information to the reader unless they’re fresh off writing the code. For example
  ‘builder build: aSpec’
has a clear simple meaning in some sense, at least when you first think about creating the code. But does the genericity imply that this builder can build something other than a spec? I’d suggest that for later readers it might have been better if it were
  ‘builder buildFromSpec: aSpec’
since that really makes it clear. 

It’s hard though; finding good names for things is probably the most difficult part of making good software (as opposed to just whacking stuff together that does the job but really has no value beyond right now).

Specifically on theMorph>buildWith: thing I’d actually prefer to go with at least opening a notification, in the hope we might end up feeling comfortable that it never happens. My guess is that the type test was simply a response to a bug that never got properly cleaned up. Similarly, take a look at SUnitToolBuilder>>#buildPluggableWindow: - now how did we ever end up with it needing a test for ‘children isSymbol’ ? That seems nuts.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange Opcodes: ZZZZZZZZZZZZ: enter sleep mode

More information about the Squeak-dev mailing list