[Info-vax] Coding with/without RDBMS

Arne Vajhøj arne at vajhoej.dk
Mon Oct 18 09:32:52 EDT 2021


On 10/17/2021 9:28 PM, Dave Froble wrote:
> On 10/17/2021 2:58 PM, Simon Clubley wrote:
>> Have you ever read Dijkstra's paper on the subject of goto statements ?
>>
>> https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf

> Several times.  Each time I get the same impression.  Square pegs and 
> round holes.
> 
> There are no bad instructions, including GoTo.  There is just good and 
> bad usage
> of instructions.  A well designed procedure can use any valid 
> instruction.  One can
> also write trash without using GoTo.
> 
> When anyone sets themselves up as the instruction gods, I got no time 
> for them.

There may not be language constructs that are always bad to use.

But there are language constructs that are rarely good to use.

In most cases usage of GOTO do make the code more difficult to
follow.

I can only think of one case where I will prefer GOTO
over alternatives: in a language without exceptions to
jump to cleanup code in case of problems. I have done that
in both C and Pascal and I think it does make the code
more readable. In newer languages with a try catch
block there is no need.

Arne



More information about the Info-vax mailing list