|
From: Neil M. <ne...@Cs...> - 2008-11-23 01:19:47
|
On 23 Nov 2008, at 01:01, Andreas Leitgeb wrote:
> Neil Madden <ne...@Cs...> wrote:
>> try ?-matchcommand cmd? script ?handlers ...? ?finally script?
>
> I don't like that particular option, and I think that glob-like
> matching will be enough for some time, but I would see for "--"
> as an options delimiter before the body (even though no options
> are yet defined) just in case we later notice that we do need any.
I believe I proposed a "--" didn't I?
>
>> ... {POSIX *} ...
>
> While I find this most practicable, it somehow does strike me as
> odd, that in this particular case, we are *supposed* to use a
> string operation (pattern-matching) on a list ($errorCode).
>
> Perhaps this pattern should be itself taken as a list, and then
> glob-matched element-wise (to the length of the pattern).
This is exactly the purpose of -matchcommand. I'd rather not have to
come up with an entirely new pattern syntax for lists (matching
nested sub-lists etc). KISS -- glob as default (as [switch] already
provides it), and leave freedom to plug in your own scheme.
> That way {POSIX *} would exhibit the same behaviour as is expected,
> but it would be easier to safely match the third element of the
> list, without being trapped by list-string meta-characters.
Lists are strings, so there should be no problem using glob. The only
problem is if you want to do something more sophisticated, like {FOO
{BAR *} JIM *}
-- Neil
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
|