rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* unexporting variables
@ 1991-09-27 20:24 Byron Rakitzis
  0 siblings, 0 replies; 2+ messages in thread
From: Byron Rakitzis @ 1991-09-27 20:24 UTC (permalink / raw)
  To: rc

Frankly, I don't see the need for leaving functions and variables out of the
environment, unless somehow your computer cannot cope with too large an
environment. Not exporting a function in particular seems to be an attempt
to defeat what is imho one of rc's better features!

What I would like to see first is local variables, which are limited lexically
by scoping rules. I think the

	local=foo command

syntax is bogus. Maybe it works well for sh, and sh-like constructs (I do not
believe that sh allows

	local=foo (lots; of; commands; here)

am I wrong?)

but I think an alternative like

	fn foo {
		local bar

	}

should be permissible.


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

* Re: unexporting variables
@ 1991-09-29  0:56 Arnold D. Robbins
  0 siblings, 0 replies; 2+ messages in thread
From: Arnold D. Robbins @ 1991-09-29  0:56 UTC (permalink / raw)
  To: rc

> Frankly, I don't see the need for leaving functions and variables out of the
> environment, unless somehow your computer cannot cope with too large an
> environment. Not exporting a function in particular seems to be an attempt
> to defeat what is imho one of rc's better features!

My reasoning for not exporting functions is that functions should be first
class citizens along with variables.  *I*F* you're going to give the programmer
control over his/her environment, it should be complete control.

I agree that exporting functions in the environment is a Good Thing.  The
issue is one of control and consistency. (IMHO)  Either allow total control
over the environment, or allow no control over it, but not partial
control (variables and not functions).

BTW, it's ok in my mind to write a program that knows how functions
are stored in the environment and can remove them along with variables.
It doesn't have to be built in to rc.

Arnold


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

end of thread, other threads:[~1991-09-29  3:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-09-27 20:24 unexporting variables Byron Rakitzis
1991-09-29  0:56 Arnold D. Robbins

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