Re: "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 20:28:27 +0000 (UTC)
James Giles <jamesgiles@xxxxxxxxxxxxxxxx> wrote:
I disagree. One of the only good things about older conventional
Fortran was the numeric labels. If more constructs besides
GOTO and DO used them it would have been an improvement.
With numeric labels you can keep them in order and that helps
navagate the code. Alphabetic labels could be ordered too, but
people tend to try to find names instead. Hence they are no
particular use in finding your way around the code.
PASCAL has numeric labels, as I understand it, to discourage
their use. When Knuth wrote TeX he did it through a preprocessor
language called WEB. (Part of what he calls literate programming,
where the program and documentation are written together as one
file, and later processed into compilable code or documentation.)
WEB accepts alphanumeric labels and generates the numerical
labels required by PASCAL in the processed output.
To me, it is the programmers responsibility to write readable code
in any language. The language should not restrict coding style
in an attempt to enforce a particular coding style. There are many
good reasons for languages restrictions, though many are left
from the days when memory was more restrictive than today.
Fortran statement labels were originally restricted to between
1 and 32767 so they could be stored in 15 bits.
-- glen
.
- Follow-Ups:
- References:
- New style DO syntax?
- From: Joe Krahn
- Re: New style DO syntax?
- From: *** Hendrickson
- Re: New style DO syntax?
- From: Gordon Sande
- Re: New style DO syntax?
- From: James Giles
- Re: New style DO syntax?
- From: Gordon Sande
- Re: New style DO syntax?
- From: Joe Krahn
- "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- From: Kevin G. Rhoads
- Re: "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- From: James Giles
- New style DO syntax?
- Prev by Date: Re: New style DO syntax?
- Next by Date: Newbie making a dumb mistake but can you help?
- Previous by thread: Re: "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- Next by thread: Re: "GOTO considered harmful" considered harmful. Re: New style DO syntax?
- Index(es):