[Oberon] Multiple RETURN in a procedure

Joerg joerg.straube at iaeth.ch
Mon Oct 24 08:12:14 CEST 2022


> what are those significant gains 
Readability!
If you see a WHILE, you know its gonna be a WHILE
If you see a FOR, you know its gonna be a FOR

With the previous RETURN statement (BTW it’s now not a „statement“ anymore but a syntactic element) you can overwrite and interrupt any call flow at any time. Spaghetti code is hard to read.

br
Jörg

> Am 24.10.2022 um 07:32 schrieb Skulski, Wojciech <skulski at pas.rochester.edu>:
> 
> Ivan:
> 
>> So, I will cite N. Wirth document, how he eliminated RETURN.
> 
>> "Now the result specification becomes syntactically a part of the procedure declaration, and
>> vanishes as an independent statement form."
> 
> It sounds like a very abstract view. Hard to disagree, and hard to appreciate either. I repeat my question: what are those significant gains of breaking lots of code? 
> 
> Wojtek
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gZ6DPj9sfsS0JFaG.jpeg
Type: image/jpeg
Size: 68245 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20221024/31c11414/attachment-0001.jpeg>
-------------- next part --------------
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list