On 05/28/2013 07:14 AM, Amos Jeffries wrote:
> On 28/05/2013 4:12 a.m., Alex Rousskov wrote:
>> On 05/27/2013 04:54 AM, Tsantilas Christos wrote:
>>> On 05/26/2013 10:05 PM, Kinkie wrote:
>>>>>> The only thing I would like to see differently implemented is the
>>>>>> syntax used to include files:
>>>>>> file(path) would be IMO easier to understand and less prone to
>>>>>> confusion than the proposed syntax.
>>>>> OK.
>>>>> But imagine in the future also the following syntax:
>>>>> file:/path/file
>>>>> system:/usr/local/squid/bin/my-squid-conf (to read from an executable
>>>>> stdout configuration options)
>>>>> http://hostname/cfgfile (to get from web page configuration)
>>>>>
>>>>> All the above can be implemented in the future...
>>>> Sure, I agree.
>>>>
>>>> file(/path/file)
>>>> system(/some/executable)
>>>> http_get(http://hostname/file)
>>> Well, this is not a bad scheme :-)
>>>
>>> Just the file:/path/to/file a little easier to implement. But not
>>> something important...
>>
>> I agree that file() is a good alternative. Amos (and others), do you
>> have a preference between
>>
>> file:"/path/file"
>>
>> and
>>
>> file("/path/file")
>>
>>
>> syntax?
>
> I slightly prefer file: without the quotes since we can use the URL
> parser to interpret it, and like Christo said extend it to full URI
> loaded remote content someday.
We can use a URL parser to parse the file URL regardless of the syntax,
I hope. And we can load external resources using full URIs regardless of
the syntax. Both file: and file() allow for that.
As for quotes, they are not required from pure syntax point of view when
the file name does not have whitespace. We can require them to minimize
conflicts with previously valid configuration values -- it is more
likely that some old configurations have file:something than
file:"something".
> If we retain the quotes, file= would seem clearer.
As usual, syntax choices are very difficult to agree on. What is clearer
to one person, looks rather misleading to another one :-(.
> () is a form of quoting
No, () is not quoting:
file(a b)
is an error because a "file(a" statement is invalid. Unquoted whitespace
is a delimiter.
HTH,
Alex.
Received on Tue May 28 2013 - 14:02:48 MDT
This archive was generated by hypermail 2.2.0 : Tue May 28 2013 - 12:00:12 MDT