Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pixutl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!wjh12!pixel!pixutl!chris From: chris@pixutl.UUCP (chris) Newsgroups: net.unix,net.unix-wizards Subject: Re: Bourne shell modifications, past and future (long) Message-ID: <10@pixutl.UUCP> Date: Mon, 18-Nov-85 11:19:52 EST Article-I.D.: pixutl.10 Posted: Mon Nov 18 11:19:52 1985 Date-Received: Wed, 20-Nov-85 00:35:16 EST References: <1943@gatech.CSNET> <10@druri.UUCP> <21@pixdoc.UUCP> <3@bbncc5.UUCP> <3328@brl-tgr.ARPA> Organization: Pixel Systems Inc., Woburn, Mass. Lines: 26 Xref: watmath net.unix:6280 net.unix-wizards:15770 > > > I think the most glaring difference between csh aliasing and > > sys5 bourne shell functions is that the latter looks up builtins first. > > This means you can't define functions that clash with shell commands. > > On the other hand shell functions have a MUCH better syntax. Why not > > move up the expansion of shell functions ahead of builtins at > > the expense of not having recursive functions. > > Very good question. My guess is that either (a) it was easier > to do it the other way, or (b) it would be considered a security > problem in restricted shells. Can DGK tell us why? The main implementation problem in having functions overrule builtins is that both builtins and functions share the same B-tree. If you wanted to have a function with the same name as a builtin, you would have to save it somewhere, add new flags, etc... all that adding overhead and complexity. Chris -- Chris Bertin : (617) 933-7735 x2336 Pixel Systems Inc. : (800) 325-3342 300 Wildwood street : {allegra|ihnp4|cbosgd|ima|genrad|amd|harvard}\ Woburn, Ma 01801 : !wjh12!pixel!pixutl!chris