From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17816 invoked from network); 14 Mar 2004 21:56:49 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Mar 2004 21:56:49 -0000 Received: (qmail 19639 invoked by alias); 14 Mar 2004 21:56:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7177 Received: (qmail 19629 invoked from network); 14 Mar 2004 21:56:30 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Mar 2004 21:56:30 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [68.1.17.113] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Mar 2004 21:56:30 -0000 Received: from quark.hightek.org ([68.12.75.33]) by lakemtao08.cox.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040314215628.BPKF10550.lakemtao08.cox.net@quark.hightek.org> for ; Sun, 14 Mar 2004 16:56:28 -0500 Received: by quark.hightek.org (Postfix, from userid 501) id 7C98A123FF; Sun, 14 Mar 2004 15:57:00 -0600 (CST) Date: Sun, 14 Mar 2004 15:57:00 -0600 From: Vincent Stemen To: zsh-users@sunsite.dk Subject: Re: Python/zsh/perl [was: named directory expansion on strings] Message-ID: <20040314215700.GA61154@quark.hightek.org> References: <1040313064100.ZM28748@candle.brasslantern.com> <1040314185437.ZM6792@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1040314185437.ZM6792@candle.brasslantern.com> User-Agent: Mutt/1.4.1i On Sun, Mar 14, 2004 at 06:54:37PM +0000, Bart Schaefer wrote: > On Mar 13, 6:48pm, Thorsten Kampe wrote: > : | print ${(r.$JUSTIFY.):-"${ltred}! ${white}..." > > You don't need $JUSTIFY there: (r.JUSTIFY.) is sufficient, because the > expression is interpreted in math context where all non-keywords are > variable references. > > : Long live the Zen of Python[2]. > > Hrm. As far as I'm concerned, the Python folks went wrong when they gave > semantic significance to depth of whitespace indentation, and all of the > right decisions they've made since have been a waste of effort. I agree. This surprising discovery is the primary reason I never put any serious consideration into learning Python. Seems like it would be a nightmare to fix if you get your indentation messed up (which is extremely common when juggling code around). Also, I use the auto indentation features of xemacs all the time. I see no way you could do that without code block delimiters. Seems like a step backward in time. As long as I am here, I thought I would use the opportunity to give you Z shell developers some more positive feedback :-). I was very pleased to find that you can do direct array indexing of single dimensional arrays in zsh. ie. if x=abcd, then $x[2] = b. That very feature is most commonly the weakness of tradition shell script and even Perl that sometimes ends up causing me to write a routine as an external C program when I am writing a complex script. As wonderful of a language as Perl is, that is the one limitation I have found that gives Z shell an advantage, even over Perl, in situations where that lower level control is needed. In Perl, it is far to much unnecessary overhead to split a string on every character, into a two dimensional array of strings, using the null delimiter, just gain access to a specific byte of the array. Then, if you modify the array, you must re-join the data back into a single string. All that, as opposed to just being able to say "$array[$i] = 'x'". This is about the only complaint I can think of I have ever really had with Perl. -- Vincent Stemen Avoid the VeriSign/Network Solutions domain registration trap! http://www.InetAddresses.net