ExecutorService - goto in disguise?

Pedro Lamarão pedro.lamarao at prodist.com.br
Mon May 23 22:49:16 UTC 2022


Em seg., 23 de mai. de 2022 às 18:34, Arkadiusz Gasiński <jigga at jigga.pl>
escreveu:


> Besides now feeling sorry for goto and how it became the whipping boy for
> all to punch left and right (yeah, some of the punches are justified, but
> still), the point that Venkat makes is pretty much what you wrote,
> Brian, which is "*goto is ok at some level*"
>

Brian mentioned that "instruction sets all include goto".
Assuming he meant the CPU's instruction set,
on this level, there is no choice in the matter.
Instruction processing at this level is strictly linear,
with no concept whatsoever of structure such as blocks or nesting or scopes.
Decision-making is testing a flag and jumping (i.e. goto) to an address.
We don't program like this anymore because it makes no sense.
This is how people program in assembly languages because there is no choice
in the matter.
Removing this from high level languages was such a tremendous success that
nobody demands adding it back.
The language of the future which removes "go" and only offers structured
programming will obtain the same effect.

-- 
Pedro Lamarão


More information about the loom-dev mailing list