rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Dave Mason <dmason@plg.waterloo.edu>
To: The rc Mailing List <rc@archone.tamu.edu>
Subject: RE: comments, newlines
Date: Fri, 13 Mar 1992 16:44:35 -0600	[thread overview]
Message-ID: <92Mar13.174441est.49339@plg.waterloo.edu> (raw)
In-Reply-To: John (I've got some bad news for you, sunshine) Mackin's message of Fri, 13 Mar 1992 05:14:22 -0500 <199203132014.5018.rc.bagel@vetsci.su.oz.au>

> From: John (I've got some bad news for you, sunshine) Mackin <john@vetsci.su.oz.au>
> Date: Fri, 13 Mar 1992 05:14:22 -0500

> I claim that # should only be seen as a comment introducer if it is
> preceded by whitespace or at the start of the line.  So if you do
> 
> echo foo#bar
> 
> you should, in my view, get "foo#bar".  You do in sh.  You don't in rc:
> Byron thinks # should introduce a comment even if it is in the middle
> of a word.  I think this is plainly wrong.  Opinions?

Why should it be special?  What's wrong with
	echo foo'#'bar
?  It's not as if octothorpe is exactly the most common character, and I
think it's actually harder for people to parse by your rules, as they have
to consider the context of whether it is preceeded by whitespace.

As for
	a=( 1 \
	# 2\
	3)

Either:
	a=( 1 3)
or:
	a=( 1 #2	---- error

Seem reasonable (in the second one you'd actually get a second error from
the ``3)'').  I can see the former as being handy, and the latter as being
consistent and simple.  I vote for consistent and simple.  I can see no
justification for the interpretation:
	a=( 1 # 2 3)	---- error

	../Dave


  reply	other threads:[~1992-03-13 22:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-03-11 17:27 haahr
1992-03-12 22:05 ` David J. Fiander
1992-03-13 10:14   ` John Mackin
1992-03-13 22:44     ` Dave Mason [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-03-14 19:39 Emin G. Sirer
1992-03-15 23:31 ` James Matthew Farrow
1992-03-15 17:54   ` schwartz
1992-03-11  7:19 schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92Mar13.174441est.49339@plg.waterloo.edu \
    --to=dmason@plg.waterloo.edu \
    --cc=rc@archone.tamu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).