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

David T. Lewis lewis at mail.msen.com
Fri Oct 6 01:48:37 UTC 2017

I think the code reads better with Tim's change, but Chris has a point.

And Morph>>buildWith: seems jarring to me because implementors of #buildWith:
are all model things, while I expect Morph to be more of a view, and so
it seems out of place. Which it is, since it is really just trying to handle
an error condition.

I just deleted Morph>>buildWith: in my working image, and if nothing bad
happens for a few days maybe that is a sign we can just get rid of it.

Some of these kinds of error checks were clearly done for purposes of
getting Morphic or MVC or ToolBuilder things working in the first place,
and may no longer be needed now that the system works and is stable. But
keep in mind that failures in these areas are the reason that we still have
an emergency evaluator, so a few extra safety checks may not be as horrible
as they seem at first glance.

So here's my suggestion: Everyone just delete Morph>>buildWith: from your
trunk image, and if nobody crashes, we can all be happy.


On Thu, Oct 05, 2017 at 04:48:48PM -0700, tim Rowledge wrote:
> 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
> --
> 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