From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1065 invoked from network); 18 Mar 2005 16:09:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Mar 2005 16:09:48 -0000 Received: (qmail 17634 invoked from network); 18 Mar 2005 16:09:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Mar 2005 16:09:41 -0000 Received: (qmail 9469 invoked by alias); 18 Mar 2005 16:09:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21006 Received: (qmail 9455 invoked from network); 18 Mar 2005 16:09:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Mar 2005 16:09:38 -0000 Received: (qmail 17335 invoked from network); 18 Mar 2005 16:09:38 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 18 Mar 2005 16:09:34 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 18 Mar 2005 16:07:59 +0000 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 18 Mar 2005 16:11:26 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j2IG9WGh012556 for ; Fri, 18 Mar 2005 16:09:32 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j2IG9Vtf012553 for ; Fri, 18 Mar 2005 16:09:32 GMT Message-Id: <200503181609.j2IG9Vtf012553@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Order of modifiers and flags in parameter expansion In-reply-to: <1050318160231.ZM1346@candle.brasslantern.com> References: <87ekeexiq3.fsf@lynx.bothi.fi> <200503181108.j2IB82Cq008067@news01.csr.com> <1050318160231.ZM1346@candle.brasslantern.com> Date: Fri, 18 Mar 2005 16:09:31 +0000 From: Peter Stephenson X-OriginalArrivalTime: 18 Mar 2005 16:11:26.0964 (UTC) FILETIME=[23446340:01C52BD5] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Bart Schaefer wrote: > [> zsh-workers] > > On Mar 18, 11:08am, Peter Stephenson wrote: > } Subject: Re: Order of modifiers and flags in parameter expansion > } > } +item(tt(10.) em(Uniqueness))( > } +item(tt(11.) em(Ordering))( > > That's funny. Why do it in that sequence? Seems like (a) it doesn't > matter to the end result [unless there's a 10.5 that's still not > documented], and (b) it would be more efficient to remove duplicates > after sorting than before. A possible clue is the intervening bit I missed out, which checks if there's still an array after making it unique and if not handles a single element. Sorting doesn't affect this. You can't rely on the list being sorted, so it must handle any combination. I doubt it makes that much difference in practice; the typical uses for unique lists that I can think of aren't ordered. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************