Friday Finking: Contorted loops

2QdxY4RzWzUUiLuE at potatochowder.com 2QdxY4RzWzUUiLuE at potatochowder.com
Thu Sep 9 21:19:45 EDT 2021


On 2021-09-09 at 22:33:16 +0000,
Stefan Ram <ram at zedat.fu-berlin.de> wrote:

>   One can think of a language where every loop is exited this
>   way, the only loop construct would be
> 
> loop
>     ...
> 
>   and it would /always/ have to be exited via enclosed breaks.

I'm not quite sure what you mean by "one can," but that's how the simple
form of Common Lisp's loop macro works.  Friendlier looping constructs
are built with other macros on top of that one and/or its underlying
mechanism.¹

¹ The underlying mechanism is the moral equivalent of a Python suite
that can also contain tags and unconditional jumps to those tags, aka
"goto"s.


More information about the Python-list mailing list