[Cuis-dev] On the changes to detect method returns in exception handlers

Phil B pbpublist at gmail.com
Thu Oct 17 16:15:01 PDT 2019


Hernan,

On Thu, Oct 17, 2019 at 6:26 PM Hernan Wilkinson <
hernan.wilkinson at 10pines.com> wrote:

>
>
>>
>>>
>>>
>>>>
>>>> I understand that you don't like #return, #return: etc. but they do
>>>> exist and are intended to be used.
>>>>
>>>
>>> hmm it is not that I do not like them as "we have to change them". My
>>> comment about them was more "conceptual/design oriented" that a claim to
>>> change them... it was just a comment to think about the matter. I use
>>> #return and the other without problem. I do not think we have to change
>>> that.
>>>
>>
>> I think I'm still not understanding your objection then.  Using Juan's
>> recent changesets to eliminate non-local returns in OMeta as an example,
>> why do you prefer that approach to using #methodReturn: within the
>> exception handler?  (I really do want to understand your objection)
>>
>
> I prefer using the normal ^ instead of #methodReturn: because:
> 1) currently, using the ^ in an exc. handler works correctly and does not
> break the exception mechanism
> 2) doing a non local return using the #methodReturn: message instead the
> ^, adds a new way of doing the same thing as ^, so it adds accidental
> complexity and redundancy that it is not really needed because of 1)
> 3) because of 2), now we have to teach beginners that when in an exc.
> handler, and only there, they have to use #methodReturn: to do a non local
> return, making the language more difficult to understand
> 4) it breaks compatibility with other Smalltalks because of something that
> currently, is not a problem.
>
> So, that is basically it... I do not see a real advantage doing this.
>

Ah, now I get it.  You're in the wrong thread.  This is the '3923 broke my
code' thread where we don't have the luxury of not doing anything ;-)  That
other thread is still a valid discussion, but I had to get my code working
with what I've got in front of me right now... (continuing to use ^ isn't
an option given the reality of literally millions of Transcript messages.
But sure, if it's decided that this whole direction isn't where we want to
go I have no problem switching back to ^ if the relevant changes end up
being reverted)


>
> Cheers!
> Hernan.
>

Thanks,
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191017/cc1f5d76/attachment.htm>


More information about the Cuis-dev mailing list