On Mon, 6 Jan 2020, Brian Walden wrote:
> csh(1) was wrtten around 1978 and yes # as a comment was only for
> scrtipts, think it was why would you need to comment interactively?
Why would you *not* want to? You've just made "#" asymmetric in its
behaviour; in the meantime the parser just sees an unescaped "#" and
ignores everything after that, without regard to context.
You might also be using "script" e.g.
script
blah blah
# Now here I do something funky
*really* funky stuff
^D
Or you might have cut and paste the commands from a script to test something, or to redo something by hand that failed for some reason.
Warner
[...]
> Also before you say wait! ALGOL uses # as comment and is older than
> Kernighan' ratfor(1). [...]
Funny; I recall ALGOL using "comment ... ;" or was that ALGOLW (which I
loved using; I wish I still had my ALGOLW book)?
-- Dave