Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: a new warning option
- X-seq: zsh-users 24332
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: Feature request: a new warning option
- Date: Wed, 9 Oct 2019 15:17:28 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QkyRAMrI/Om3vDNwfqssjk+P92bBSNPeaezPGVK1Tms=; b=pgfy6H0BVGvfrFi8bz3EMTxZFnBaltY8U2AkKCngZMnQIPV+OcIgzvz0X4CyZHd0VZ G7yrw9iDM89SvFWDokaxBZOqQrCnNpN3LmGceTqUpbSLiWtLfLCkAidap9FdIqNCUN3I uNYd7cGj4tjdRoxD3Kll+k8Ce5QTcRZUidcpiU1oJlt63QldO8gROd1xk1s+0gbIAoci YgPTc2L5DWZswzgzTc91EV+ah6c7J7Kw75YeU7Cr9xmMN79d5gVXIltGRf9Q0x8wY1ZM j9pFli30stW/dSayKVCZga1Ad4D1VXVV4IcWxtPFzUZyTEFPiTdgd7JTP5MdxrTpBZBH jQpg==
- In-reply-to: <CAN=4vMq9uM_myMu55xjZ-+483JUY+VnmeEd4kCpOqBc8SurwFg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDN-GspoiS-iVR5ThdbDVbLWVNJWcZ=TyY0=9ydtPswAw@mail.gmail.com> <CAN=4vMraXtTooeYfBDGObA7xVhoC6JpHRz1C3CUHKiW=LY8Nuw@mail.gmail.com> <CAKc7PVChNY2jjRW2TSw0c=V6yXv+5cp1OsgikihLv0iUi2+h=g@mail.gmail.com> <CAN=4vMq9uM_myMu55xjZ-+483JUY+VnmeEd4kCpOqBc8SurwFg@mail.gmail.com>
On Wed, 9 Oct 2019 at 14:08, Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> Warns if `x && y || z` cannot be proven through static analysis to
> be equivalent to `if x; then y; else z; fi`.
>
> Doesn't this strike you as odd? If the latter construct has the
> desired semantics, why not use it in the first place? It'll obviate
> the need for a new warning and convey the intention to humans reading
> the code.
The x && y || z is less verbose. It doesn't require `then' and `else'
and `fi'. I'm writing from my point of view – that are the reasons why
I use &&/||.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author