emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unquoted special characters in regexps


From: martin rudalics
Subject: Re: Unquoted special characters in regexps
Date: Sun, 26 Feb 2006 20:26:09 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> You are confusing validity with meeting stylistic guidelines.  The
> fact that string-match returns 0 instead of throwing an error shows
> that the regexps are valid.  "*", "." and so on are valid regexps too,
> even though they violate stylistic guidelines. "[" is _not_ a valid
> regexp.
>
> You can change stylistic guidelines by making doc changes.  You can
> only change what is valid by making code changes.

A stylistic guideline can tell me to write comments or documentation
strings in a particular way in order to improve their readability.  Even
if I don't follow the guidelines I'm confident that a future Elisp
interpreter will still execute my program correctly.

Validity of a regular expression is something more serious though.  If
someone decides one day that "*" is no more a regular expression the
interpreter should accept I have to rewrite my program.  And I couldn't
possibly complain - I've been warned.

You are confusing "validity" based on the implementation of a particular
interpreter with validity based on mathematical reasoning.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]