[squeak-dev] How should one implement a custom window color for a custom window?

Marcel Taeumel marcel.taeumel at hpi.de
Mon Sep 18 14:15:10 UTC 2017


Uh-oh. I broke this list conversation by accident. I did not notice. This is what happened:

Me: It is only a single global state/entry point. If tests can point you to this problem, then it should be easy to clean up resp. fix.

Stef: Ok I see what you mean but I think we talk past each other. In my opinion, we should not expect the developer to be super good at catching things like this, we should instead make it difficult for anyone (that is, not-so-good programmers) that simply uses the API to break something. The API should be foolproof.

Me: I basically agree. Yet, there is no such thing as "fool-proof" API in a dynamic system such as Squeak/Smalltalk. We can only provide tools that help discover mistakes and inconsistencies. ;-) It remains a trade-off. As Chris mentioned before, we have the priority of code readability. DNU + tools still looks like a good trade-off to me.

---

Well, I am aware that my system knowledge makes it difficult to anticipate some user challenges. Nevertheless, I want to emphasize the fact that the system is full of trade-offs and that the programming language alone cannot solve all issues. Tools matter. 

Considering memory leaks, they can happen. We need tools to detect them. Maybe domain-specific ones, maybe generic ones.

Considering Squeak's image concept in general: I think we really need more ideas on how to manage object state in the long term. A sole focus on code (artifacts) and bootstrapping techniques seems wrong to me. :)

Btw: Tobias just mentioned that the combination of Object >> #userInterfaceTheme and UserInterfaceTheme >> #doesNotUnderstand: kind of implements higher-order messaging (HOM). :D

Best,
Marcel
Am 18.09.2017 11:33:13 schrieb Stéphane Rollandin <lecteur at zogotounga.net>:
> I just added a new test for the themes. If the integrity of a theme is
> broken, one can just browse all senders of #userInterfaceTheme and
> debug. I claim that it is quite simple to diagnose. :)

I am not too concerned by having the integrity of a theme broken. What I
see more likely is objects accumulating silently in the stack until this
becomes a problem.

Stef

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170918/caa2a79f/attachment.html>


More information about the Squeak-dev mailing list