Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
a little alternative syntax improvement?
- X-seq: zsh-users 20797
- From: Marc Chantreux <khatar@xxxxxxxxx>
- To: Zsh hackers list <zsh-users@xxxxxxx>
- Subject: a little alternative syntax improvement?
- Date: Tue, 20 Oct 2015 11:22:00 +0200
- 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
hello,
this message is just a proposal but i don't know how naive it is.
i just give it a try.
alternative syntax for for control statements are really pleasant
because the lhs uses the good context
      # lhs           # rhs
while ((count-- > 0)) { do_something }
while [[ -e $file ]]  { do_something }
and could be a bit more if the rhs would be context sensitive also:
for the moment, you need to write
    while {next_file} {((
        older = last < older ? last : older,
        count++
    ))}
when it would be more readable and consistent to write
    while {next_file} ((
        older = last < older ? last : older,
        count++
    )) 
my two cents.
regards
-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
    -- Abraham Lincoln
Messages sorted by:
Reverse Date,
Date,
Thread,
Author