Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: arithmetic operator precedence
- X-seq: zsh-workers 25183
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: arithmetic operator precedence
- Date: Tue, 17 Jun 2008 12:46:43 +0100
- In-reply-to: <20080617112815.GF10734@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080612095723.GF5113@xxxxxxxxxxxxxxx> <20080616080726.GP10734@xxxxxxxxxxxxxxxxxxx> <20080616144211.276fb0e3@pws-pc> <2d460de70806170219k12ff4cadn441b52c48bf8076f@xxxxxxxxxxxxxx> <20080617094509.GC5016@xxxxxxxxxxxxxxx> <2d460de70806170324o5a44609x9383cc2445d67dd6@xxxxxxxxxxxxxx> <20080617103829.GD5016@xxxxxxxxxxxxxxx> <20080617114340.398c731f@news01> <20080617112815.GF10734@xxxxxxxxxxxxxxxxxxx>
Vincent Lefevre wrote:
> Also, when people don't agree about the precedence of operators, a
> solution could be to require parentheses (but I don't know if this
> is easy to implement such rules). At least ambiguity is avoided.
That would be quite sensible, but the problem is we already have two
cases: traditional zsh behaviour, which we don't want to change now, and
"some sort of" compatilibity mode. As it looks like "some sort of"
compatibility might as well be with other shells (so the option could
really be called "SH_PRECEDENCES", although it's perhaps less obvious that
means "something approximating to the precedences you probably expect if
you are a regular programmer") this doesn't give us room for manoeuvre
without yet another option.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author