Hi, On Sat, Nov 03, 2007 at 11:18:36PM +0000, place wrote:
Jorge wrote:
After some study and a reimplentation of plain.cc with classes (getting rid of its linkblock and hooking a callback for memory handling), it looks simpler and better. It looks like the same may be done with html.cc.
I was just wondering how you weigh the options of adding a callback vs. adding a signal. I had experimented with a destroy signal in my tree recently. It seemed more consistent to me, although I suspect the various child widgets were wasting cycles on signal emission code when they didn't have any receivers...
I'd say that for me, the key is simplicity, and elegance. In a sense, accurately captured by this quote: "The key to performance is elegance, not batalions of special cases" -- Jon Bentley and Doug McIlroy In the case of Dillo, I've seen several times the simplicity pay off. When code gets simpler, debugging and improving accelerates. With complexity it stagnates. Elegance helps to keep the design simple and flexible. Having flexibilty in the design, helps to tackle unforeseen problems at the design level, without workarounds, reducing complexity and special cases. -- Cheers Jorge.-