[squid-dev] [RFC] Where do ACL flags belong?
Alex Rousskov
rousskov at measurement-factory.com
Fri Dec 4 15:59:28 UTC 2015
On 12/04/2015 05:49 AM, Eliezer Croitoru wrote:
> On 04/12/2015 08:51, Alex Rousskov wrote:
>> The -n approach is overall better than _str suffix approach because the
>> former makes it easy to mix-and-match multiple flags and to support
>> flags with values such as -m=delimiters.
> The only real differences that I can understand(after almost 24 hours
> straight no sleep) is that admins are used to use "-n" in many unix tools.
The important difference between the -x flag and the _x suffix is that
when you have five flags (and we will!), some with additional parameters
and some without, the _suffix syntax becomes an impediment while the
"command line options" syntax that admins are used to continues to work
well. Compare:
acl foo dstdomain_a=4_b_c=__d v1
with
acl foo dstdomain -a=4 -b -c=_ -d v1
> So +1 for both ideas but another +0.5 to dstdomain_str just because I
> sometimes just don't like -n and all sort of cryptic meanings that
> shortened words or flags have.
Your dislike of the letter n is noted. IMO, it was an OK choice because
-n is often used for --dry-run "do nothing" options and that is what -n
is kind of about in Squid ACL context. I am sure any other single letter
would have raised some objections too.
Nobody stops us from supporting longer flag names, of course. Many
modern programs (that admins are familiar with) support them. I would
welcome patches adding such support, but support for longer flag names
is a completely separate issue IMO.
Thank you,
Alex.
More information about the squid-dev
mailing list