From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 370 invoked from network); 27 Mar 1997 19:02:00 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 27 Mar 1997 19:02:00 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA10931; Thu, 27 Mar 1997 13:54:40 -0500 (EST) Resent-Date: Thu, 27 Mar 1997 13:54:40 -0500 (EST) To: Zefram From: Roderick Schertler cc: zsh-workers@math.gatech.edu (Z Shell workers mailing list) Subject: Re: ksh autoloading In-reply-to: Your message of "Thu, 27 Mar 1997 18:36:04 EST." References: <1424.199703271836@stone.dcs.warwick.ac.uk> Date: Thu, 27 Mar 1997 13:57:19 -0500 Message-ID: <14594.859489039@eeyore.ibcinc.com> Sender: roderick@ibcinc.com Resent-Message-ID: <"jYN7h1.0.kg2.l9iEp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3041 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Thu, 27 Mar 1997 18:36:04 +0000 (GMT), Zefram said: > Roderick Schertler wrote: >> >> One of the nicest things about the ksh semantics are that you can define >> the function plus run some initialization code. It sounds like your >> patch will disallow that. > > Not at all. Using the zsh style, we can autoload a function foo from > a file saying: Well, of course, if the function is written knowing it could run under ksh or zsh then it can be made to work. The problem is that a function which was written in ksh style will suddenly stop working (on first invocation). > Remember that the zsh form of autoloading is the canonical one, to be > preferred, and technically superior in some ways to the ksh semantics. I don't see how the zsh behavior is superior, and I do see advantages to the ksh behavior. I always figured it was an oversight/misunderstanding on the part of pws, like the [16]ff business. Consider a file which provides 3 tightly related functions and runs some initialization code. I used such a think for directory stack handling in ksh, eg. In ksh you link it to the 3 names. In zsh you have to do some work. I can't think of a real example which zsh makes easier than ksh. > I think it's more important for self-modifying functions using the zsh > style to work correctly than it is for ksh style functions with > initialisation code to work exactly the way they do in ksh. I wanted to be sure you knew you were breaking ksh compatibility. Since you know and you still think it's right that's okay with me. I don't feel strongly about the issue because there are workarounds. I used to use these workarounds before zsh provided any ksh autoloading, I could go back to using them if I found I needed to start using ksh again. -- Roderick Schertler roderick@argon.org