Sujet : Re: The joy of FORTRAN
De : peter_flass (at) *nospam* yahoo.com (Peter Flass)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 01. Mar 2025, 19:43:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1193769225.762545617.347047.peter_flass-yahoo.com@news.eternal-september.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : NewsTap/5.3.1 (iPad)
c186282 <
c186282@nnada.net> wrote:
On 2/28/25 7:39 AM, Bob Eager wrote:
On Fri, 28 Feb 2025 02:34:52 +0000, rbowman wrote:
Sadly, macros made their way into C. The basic idea was fine but we had
one programmer who laid awake nights thinking up new perverted things to
do with macros. I forget if it was Kernighan or Ritchie who later said
if they had only known what people would do with them...
I probably do far too much with a standalone macro processor...
It's unfortunately NOT hard to make 'C' *totally
unreadable*, impossible to follow. Sometimes you
see the young hot-shots cram a dozen lines worth
of stuff into a single line with LOTS of punctuation
characters and bracket tricks. It's also possible to
obfuscate using too many, esp nested, macros.
Thing is, those ultra-compacted lines don't really
run any faster - the same functions and ops are
being run regardless.
Being kinda old-school my pgms always look like
something from the K&R book, and with comments
after almost every line. THAT you can read a
day from now, or a year from now ....
Never can have enough comments. I usually use lots, but recently I was
looking over some of my old code and had a “what?” moment. It was obvious
when I wrote it.
-- Pete