<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 13, 2016 at 11:52 AM, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">> Instead of checking for "understands" we should use valueOfFlag: (which<br>
> defaults to false) to get back the old behavior.<br>
<br>
</span>Hmm, I'm not sure "false" makes sense as a universal default value.<br></blockquote><div><br></div><div>False is the default for valueOfFlag:. It is nil for valueOfPreference:.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Apps typically choose their own lazy-initialized values<br>
attribute-by-attribute, and usually based on it having been nil. <br></blockquote><div><br></div><div>We're talking about old-style preferences which IMHO used to be a very convenient, succinct, and highly readable. We just wrote "Preferences myFlag ifTrue: [...]" and this would universally work *without any other support code*. This was really nice for live experimenting, you just throw this expression in somewhere without having to worry about breaking anything.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> Or we recreate the<br>
> preference.<br>
<br>
</span>Sure.<br>
<span class="gmail-"><br>
> Or we make it into a "pragma" preference on some class (which<br>
> seems to be the preferred way nowadays, even though it leads to an explosion<br>
> of pref accessor methods?)<br>
<br>
</span>*Thank you* for leveling a fair critique at pragma preferences.  IMO,<br>
they are preventing the emergence of simple and powerful abstractions<br>
in our Preferences framework while, as you alluded, making lots of<br>
code.  :(  Their real benefits deserve some scrutiny.<br>
<br>
> What would be best?<br>
<br>
This.<br>
<br>
   <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-March/188486.html" rel="noreferrer" target="_blank">http://lists.squeakfoundation.<wbr>org/pipermail/squeak-dev/2016-<wbr>March/188486.html<br></a><br></blockquote><div><br></div><div>Agreed, but it doesn't really answer my question of what to write instead of "(Preferences understands: #foo) and: [Preferences foo]".</div><div><br></div><div>- Bert - </div></div><br></div></div>