<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 10:11 PM, Lubomir I. Ivanov <span dir="ltr"><<a href="mailto:neolit123@gmail.com" target="_blank">neolit123@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7 November 2015 at 00:58, K. "pestophagous" Heller<br>
<span class=""><<a href="mailto:pestophagous@gmail.com">pestophagous@gmail.com</a>> wrote:<br>
><br>
> broadcast/listener pattern is one thing, but using it in *combination*<br>
> with globally shared mutable state ("displayed_dive" in the above<br>
> example) is really where things get fragile.<br>
><br>
<br>
</span>i agree, this has to be taken care off at some point.<br>
it's usually OK for single threaded apps to use singletons and shared<br>
states for isolated areas of the code base, but for more complicated<br>
things, i'd say - invest the time and deal with the problem in the<br>
early stages then grade on a concrete base.<br></blockquote><div><br></div><div>Things that I currently don't like in the code:<br></div><div>'Prefs' global structure<br></div><div>'displayed_dive'<br></div><div>'current_dive'<br></div><div>'current_dive_site'<br><br></div><div>I'm cleaning things as I go near them.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
lubomir<br>
--<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</div></div></blockquote></div><br></div></div>