<br><br><div class="gmail_quote">On Sat, Feb 2, 2013 at 2:36 PM, Frank Shearar <span dir="ltr"><<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@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 31 January 2013 22:59, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>> wrote:<br>
> On 30 January 2013 20:04, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
>> Frank Shearar uploaded a new version of Kernel to project The Inbox:<br>
>> <a href="http://source.squeak.org/inbox/Kernel-fbs.736.mcz" target="_blank">http://source.squeak.org/inbox/Kernel-fbs.736.mcz</a><br>
>><br>
>> ==================== Summary ====================<br>
>><br>
>> Name: Kernel-fbs.736<br>
>> Author: fbs<br>
>> Time: 30 January 2013, 8:04:08.926 pm<br>
>> UUID: 1d99c937-4c68-475c-987b-2990c8040c29<br>
>> Ancestors: Kernel-fbs.735<br>
>><br>
>> Rename NotImplemented errors in line with conventions 2 of 3.<br>
>><br>
>> =============== Diff against Kernel-fbs.735 ===============<br>
><br>
> If folks are happy with what I've got, I'd like to make one more<br>
> change, and remove NotYetImplemented>>#defaultAction. This will make<br>
> this message send open up a Debugger. Then I just need to tweak the<br>
> Debugger to show the Create button.<br>
><br>
> If people think that's sensible I'll make the change and resubmit,<br>
> clearing out obsolete Inbox ancestors to show a more complete diff.<br>
<br>
Actually, I'm going to hold off on touching NotYetImplemented. I think<br>
it's a good idea to remove the default action, but it and<br>
#shouldBeImplemented have a wrinkle that I can't see right now how to<br>
fix.<br>
<br>
Let's say you have Bar >> #ff [ self notYetImplemented ]. You evaluate<br>
`Bar new ff` and the Debugger pops up, asking if you want to create<br>
that method. You enter the desired behaviour - `^ 1` - and accept. The<br>
stack now looks like this:<br>
<br>
Bar >> #ff (containing `^ 1`)<br>
Bar >> #ff (containing `self notYetImplemented`)<br>
<the topmost frame of the rest of the stack><br>
<the rest of the stack, ending in a DoIt><br>
<br>
The topmost context returns, and _retriggers_ the exception. Instead,<br>
we should _discard_ the `self notYetImplemented` stack frame and have<br>
the new implementation return its result to <the topmost frame of the<br>
rest of the stack>.<br>
<br>
It's probably not even hard, but my brain's a big mushy.<br></blockquote><div><br></div><div> currentContext privSender: currentContext sender sender</div><div>or</div><div> currentContext swapSender: currentContext sender sender</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So instead I'd like to merge what I have, and add as a separate enhancement<br>
* removing NotYetImplemented >> #defaultAction<br>
* returning to the sender sender context, <the topmost frame of the<br>
rest of the stack>.<br>
<br>
This latter step should also avoid the problem of people not writing<br>
their stubs as `^ self subclassResponsibility`, which prevents<br>
seamlessly progressing with one's computation. (If you don't say `^`<br>
then your new result-returning implementation returns its result to<br>
the non-`^` stub/marker context, which returns self.)<br>
<br>
I want the experience of implementing missing functionality to be<br>
almost like rewriting history - "we have always had this<br>
implementation of this message". (To be read in the same voice as "We<br>
have always been at war with Eurasia.")<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>