[Cuis-dev] Code duplication around unwinding

Hernán Wilkinson hernan.wilkinson at 10pines.com
Thu Feb 2 10:00:19 PST 2023


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> 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
>
>
>
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230202/69cb62be/attachment-0001.htm>


More information about the Cuis-dev mailing list