Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Want to replace bash w zsh as system shell on Ubuntu
- X-seq: zsh-users 14778
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- Subject: Re: Want to replace bash w zsh as system shell on Ubuntu
- Date: Tue, 02 Feb 2010 22:31:12 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- In-reply-to: <alpine.LNX.2.01.1002021600020.2729@xxxxxxxxxxx> (Benjamin R. Haskell's message of "Tue, 2 Feb 2010 16:11:29 -0500 (EST)")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100202081546.GA5930@xxxxxxxxx> <201002021928.20601.joke@xxxxxxxxx> <87fx5jjw7m.fsf@xxxxxxxxxxxxxxxxxxxxxx> <201002022029.06336.joke@xxxxxxxxx> <87bpg7jscq.fsf@xxxxxxxxxxxxxxxxxxxxxx> <alpine.LNX.2.01.1002021600020.2729@xxxxxxxxxxx>
Benjamin R. Haskell wrote:
> On Tue, 2 Feb 2010, Frank Terbeck wrote:
>> Joke de Buhr wrote:
>> > By the way what is this syntax actually: (( ${#foo} > 0 ))
>>
>> Yes, which is exactly what I used in both of my mails:
>> (( ${#matches} > 0 )) && ...
>> (( ${#array} > 0 ))
>
> I think Joke de Buhr meant (paraphrasing) "What is this syntax exactly?"
Ah, you're right. For some reason I read "the syntax is actually:". I
don't know what crude pun my brain is playing on me today. :)
[...]
>> Well, until someone tells me whether (( .. )) or [[ .. ]] would be
>> preferable performance-wise (which probably doesn't make that much of
>> an impact) I'll keep using arithmetic expressions when it comes to
>> numbers. I find that a) logical and b) arithmetic expressions have a
>> lot more features for handling numbers than [[ .. ]] type tests do. I
>> guess that's my personal preference.
>
> Pretty sure the performance benefits of one versus the other are more
> than outweighed by the benefit(s) of clarity and/or personal preference.
Agreed. :-)
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author