From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.astro.wisc.edu ([128.104.39.15]) by hawkwind.utcs.toronto.edu with SMTP id <2223>; Wed, 19 May 1993 14:05:27 -0400 Received: by oldp.astro.wisc.edu (5.65/DEC-Ultrix/4.3) id AA08447; Wed, 19 May 1993 13:05:11 -0500 Message-Id: <9305191805.AA08447@oldp.astro.wisc.edu> To: quanstro@epsilon.eecs.nwu.edu (Erik Quanstrom) Subject: Re: lazy auto-loading of functions Cc: rc@hawkwind.utcs.toronto.edu Date: Wed, 19 May 1993 14:05:10 -0400 From: Alan Watson X-Mts: smtp 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.