rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.astro.wisc.edu>
To: quanstro@epsilon.eecs.nwu.edu (Erik Quanstrom)
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: lazy auto-loading of functions
Date: Wed, 19 May 1993 14:05:10 -0400	[thread overview]
Message-ID: <9305191805.AA08447@oldp.astro.wisc.edu> (raw)

Functions are where it's at.  They have two advantages from a
programmers point of view over shell scripts: you can use them as
front-ends to executables and then use `builtin' to get at the original
(John Macklin posted a `pathos' script to the mailing list way back, but
using builtin in a function is more elegant) and you can also rid of
them with -p, and not have to play tricks with path in sensitive
scripts.  It's also one fewer fork and exec.

I have enough functions that I don't want to keep them all in .rcrc, One
of the reasons I hadn't converted more of my scripts to functions was
that I was worried things sourcing them all individually would be slow
-- now there is no impediment.

Alan.


             reply	other threads:[~1993-05-19 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-19 18:05 Alan Watson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-19 17:39 Erik Quanstrom
1993-05-19  4:40 Alan Watson

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=9305191805.AA08447@oldp.astro.wisc.edu \
    --to=alan@oldp.astro.wisc.edu \
    --cc=quanstro@epsilon.eecs.nwu.edu \
    --cc=rc@hawkwind.utcs.toronto.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).