<div dir="ltr"><div dir="ltr">On Tue, Jan 5, 2021 at 9:24 AM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jan 05, 2021 at 01:17:50PM +0100, Marcel Taeumel wrote:<br>
> Hi Dave.<br>
> <br>
> >??Provide vmParameterAt:default: to handle primitive failure on reading VM parameters.<br>
> <br>
> Hmm... #vmParameterAt:ifAbsent: would be "more idiomatic"?<br>
> <br>
<br>
I was not sure about this either. It tried "ifAbsent" and "onError"<br>
but ifAbsent sounded too much like collection behavior, and onError<br>
just looked strange. In the end I decided that what we are really<br>
trying to do is supply a default in the case of a VM that does not know<br>
about a VM parameter, so that's how I ended up with vmParameterAt:default:<br>
<br>
Dave<br></blockquote><div><br></div><div>I had the same reaction though, especially since you allow passing a block which is evaluated only if the primitive fails.</div><div><br></div><div>Maybe thinking of it as being equivalent to </div><div><br></div><div>   Smalltalk getVMParameters at: index ifAbsent: [...]<br></div><div><br></div><div>would make the "... ifAbsent:" more palatable?</div><div><br></div><div>Vanessa</div></div></div>