Operator precedence and #777

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Sep 21 17:55:42 CEST 2010

In message <20100921152439.GA23587 at sunrider>, Kristian Lyngstol writes:

>Basic problem:
>   (!foo ~ "bar")
>no longer works in trunk. It used to mean the same thing as:

The change is unintentional, and I will attempt to fix it.

>Slink also pointed out that it might make sense to have a clearly defined
>operator precedence list.

Yes, I am working from sort of a plan in this respect, and yes
that should go into docs once finished and stable.

The overal outline is that anything boolean has the lowest precedence
which is why (!foo ~ "bar") should be interpreted as (!(foo ~ "bar"))
as it used to be in 2.1

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list