Operator precedence and #777
Nils Goroll
slink at schokola.de
Tue Sep 21 19:55:38 CEST 2010
> 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
I'm fine with this personally and for the time being, but I'd like to point out
that as VCL evolves as a (domain specific) programming language, I expect people
to report difficulties if operator precedence differs too much from other
languages. The boolean negation operator is a drastic example which has very
high precedence in most languages I know. To me, borrowing operator precedence
from perl would look very natural.
Refs:
http://www.uni-bonn.de/~manfear/javaoperators.php
http://en.wikipedia.org/wiki/Order_of_operations#Programming_languages
http://www.sdsc.edu/~moreland/courses/IntroPerl/docs/manual/pod/perlop.html#SYNOPSIS
Nils
More information about the varnish-dev
mailing list