[Cuis-dev] Code duplication around unwinding
Juan Vuletich
juan at cuis.st
Fri Feb 24 03:00:55 PST 2023
Hi Jaromir,
I think this is a good idea, and I agree with the desire to go back to
the older Squeak design. However, I don't know why it was made more
complicated. It would be good to understand the rationale behind those
changes, unless we can be sure that the behavior is identical.
Did you get any relevant feedback from the Squeak list? Maybe someone
who is aware of the history of these changes is still available to tell.
If not, I can spend a little more time and try to do a proper review of
the changes myself, although, as you know, this is a bit beyond my
comfort zone!
Thanks!
On 2/2/2023 3:28 PM, Jaromir Matas via Cuis-dev wrote:
>
> Hi Hernán,
>
> Thanks for your message!
>
> > I'll take a look at the code you sent but I prefer for Juan to
> return to integrate it
>
> … of course, there’s no rush, the duplication has been around for 20
> years :D
>
> Most of all, I’m interested in your opinions. As an example, I find
> this call sequence desperately begging for simplification:
>
> Exception>>resume: --> resumeUnchecked: --> resumeEvaluating: -->
> Context>>returnEvaluating: --> resumeEvaluating:
>
> I mean: in order to resume from an exception you have to traverse four
> other methods rather than just getting it done in Exception>>resume:
> as was originally implemented in Squeak 2.8 through 3.5. My aim is to
> get back to this design - unless I’ve missed some fundamental reason
> why not to. Any feedback **very** welcome.
>
> Thanks again,
>
> --
>
> *Jaromír Matas*
>
> mail at jaromir.net
>
> *From: *Hernán Wilkinson <mailto:hernan.wilkinson at 10pines.com>
> *Sent: *Thursday, February 2, 2023 19:00
> *To: *Discussion of Cuis Smalltalk <mailto:cuis-dev at lists.cuis.st>
> *Cc: *juan at cuis.st <mailto:juan at cuis.st>; Jaromir Matas
> <mailto:mail at jaromir.net>
> *Subject: *Re: [Cuis-dev] Code duplication around unwinding
>
> Hi Jaromir,
>
> thank you for this proposal!
>
> Juan is on vacation, deserved vacations :-)
>
> I'll take a look at the code you sent but I prefer for Juan to return
> to integrate it because he was more involved in the changes you sent.
>
> About the reason of the duplication of code you see the answer could
> be really simple: copy & paste!!! :-)
>
> I also sometimes spend time trying to understand why the code is
> duplicated and most of the time it is just that, copy & paste without
> any intention or knowledge to do it better. I mean, usually it is a
> human reason, not a technical one.
>
> Cheers!
>
> Hernan.
>
> On Thu, Feb 2, 2023 at 1:38 PM Jaromir Matas via Cuis-dev
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
> Hi Juan,
>
> I'm enclosing a changeset for your review. I've just sent a
> similar suggestion to Squeak list hoping to get some feedback.
>
> The aim is to reduce the code duplication in
> ContextPart>>#restart, #resume:through:, #resumeEvaluating:
> methods that are implementing the same unwind mechanism we already
> have in unwindTo:. I've always wondered why the same algorithm is
> duplicated so many times (it used to be in terminate too!) but
> never really found out.
>
> At the same time this code duplication was introduced in Squeak
> 3.6, the unwind mechanism was moved from the Exception class to
> ContextPart and, but this is just my hypothesis, never cleaned up
> properly.
>
> I'd be very thankful for your thoughts and your opinion about the
> enclosed changeset.
>
> Many thanks,
>
> Jaromir
>
> --
>
> *Jaromír Matas*
>
> mail at jaromir.net <mailto:mail at jaromir.net>
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
>
> --
>
> *Hernán Wilkinson*
> *Agile Software Development, Teaching & Coaching*
>
> *Phone: +54-011*-4893-2057
>
> *Twitter: @HernanWilkinson*
>
> *site: *http://www.10Pines.com <http://www.10pines.com/>
>
> Address: Alem 896, Floor 6, Buenos Aires, Argentina
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230224/a4e168d4/attachment-0001.htm>
More information about the Cuis-dev
mailing list