From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12384 invoked from network); 16 Apr 2004 17:25:52 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 16 Apr 2004 17:25:52 -0000 Received: (qmail 8615 invoked by alias); 16 Apr 2004 17:25:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19786 Received: (qmail 8583 invoked from network); 16 Apr 2004 17:25:43 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 16 Apr 2004 17:25:43 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 16 Apr 2004 17:25:43 -0000 Received: (qmail 17599 invoked from network); 16 Apr 2004 17:25:43 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 16 Apr 2004 17:25:40 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i3GHPcd30372 for zsh-workers@sunsite.dk; Fri, 16 Apr 2004 10:25:38 -0700 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040416172538.ZM30371@candle.brasslantern.com> Date: Fri, 16 Apr 2004 17:25:38 +0000 In-Reply-To: <13987.1082134179@trentino.logica.co.uk> Comments: In reply to Oliver Kiddle "PATCH: Re: Compsys and KSH_AUTOLOAD" (Apr 16, 6:49pm) References: <1040410174430.ZM10891@candle.brasslantern.com> <1170.1081778412@athlon> <040412085942.ZM19035@candle.brasslantern.com> <3571.1081806187@athlon> <1040413053826.ZM20012@candle.brasslantern.com> <18035.1081870188@trentino.logica.co.uk> <1040413175111.ZM21011@candle.brasslantern.com> <13987.1082134179@trentino.logica.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: Compsys and KSH_AUTOLOAD MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: **** X-Spam-Status: No, hits=4.7 required=6.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 4.7 On Apr 16, 6:49pm, Oliver Kiddle wrote: } } Why do export and readonly accept -f arguments? Is that just to avoid } errors on bash scripts? Any reason why we shouldn't implement readonly } functions. It could get pretty tricky to have a readonly autoloaded function. Does the function become readonly only after the autoload occurs? What *can* one change about a readonly function -- can one `typeset -t' it? If it hasn't been loaded yet, can the new ksh/zsh autoload flags be changed? BTW, independent of readonly, what do +z and +k mean? Revert the function to using the current global ksh_autoload setting? What happens if you use +k on a function that has -z ? } On 13 Apr, Bart wrote: } > } > } > Here's a possibly-silly idea: Those flags could be made to apply } > } > to arrays as well as functions } } [If] the math modulo operator is being used on an index variable, zero } based arrays are more useful. Having `-z' mean not zero-based might be } confusing though. Yes, that's true. Having -z mean something different for arrays and functions might be confusing, too, unless -k is invalid for arrays, but that might be more confusing than having -k mean zero-based and -z not valid. Argh, my head hurts.