Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Want to replace bash w zsh as system shell on Ubuntu



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