rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* What good is ``?
@ 1991-07-01 21:08 Mark-Jason Dominus
  0 siblings, 0 replies; 2+ messages in thread
From: Mark-Jason Dominus @ 1991-07-01 21:08 UTC (permalink / raw)
  To: rc; +Cc: mjd


On a related note: Given Byron's policy of not adding features unless
the feature implements genuinely new functionality, what's the rationale
behind ``?

Why not replace
	`` (foo) {bar}

with

	`{ ifs=(foo) echo `{bar}}

which is the obvious way to do the same thing without a crufty
piece of syntax?

People who like `` anyway can make a shell function.

  The night is pleasing to us because, like memory, it erases idle details.
Mark-Jason Dominus 	  			    mjd@central.cis.upenn.edu 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re:  What good is ``?
@ 1991-07-01 22:44 Paul Haahr
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Haahr @ 1991-07-01 22:44 UTC (permalink / raw)
  To: mjd, rc

i guess i should respond to this, since i pressured byron into adding ``
many moons ago.  my argument is you need either ` and ifs, or `` and
`` is simpler.  my best of all possible worlds solution gets rid of
ifs, because i don't like state variables.  with ifs, how do you use
two different backquote expressions in the same command?  (answer:
you can't.)

incidentally, none of these
	x=`{ ifs=: echo -n a:b }
	x=` ifs=: { echo -n a:b }
	ifs=: { x=`{ echo -n a:b } }
is the same as
	x=`` : { echo -n a:b }
although this is:
	ifs=: { x=`{ echo -n a:b } ; }

moreover, it is impossible to define a shell function to do `` because
brace enclosed groups are not first class objects in rc.  (that is my
most serious gripe against the language.)

`` may very well be a mistake.  certainly it and ifs are redundant.  i
believe byron's implementation translates
	`foo
to
	`` $ifs foo
internally, and vice-versa for whatis, so the cost seems minimal to me.
it depends on which one you treat as extra.  (that ifs is in td's paper
probably makes that a closed issue, unfortunately for my case.)

so what do other people say?  is `` too much of a blemish?

paul

[ it is surprising to me that i find myself being the main proponent of
creeping featurism.  i'm usually a vociferous opponent.  i guess that's
what happens when you become a user instead of a designer. ]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1991-07-01 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-07-01 21:08 What good is ``? Mark-Jason Dominus
1991-07-01 22:44 Paul Haahr

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).