help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: use Elisp to improve your Elisp - some code issues


From: Pascal J. Bourguignon
Subject: Re: use Elisp to improve your Elisp - some code issues
Date: Sun, 02 Aug 2015 02:44:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> "Pascal J. Bourguignon" <pjb@informatimago.com>
> writes:
>
>>> It would be more illustrative if you provide
>>> a counterexample of the same construct which cannot
>>> be caught by that or another regexp. It will be
>>> interesting to see if that example is anything
>>> I would put in my code, ever.
>>
>> It's easy. Try to simplify (- x x) for any sexp x,
>> (assuming x doesn't side effect. Just something like
>> (+ 2 y) or (+ (* a x x) (* b x) c).
>
> ...?
>
> The example was finding (if a a b). Didn't you say
> regexps couldn't identify all such cases because of
> lack of expressiveness with respect to the more
> expressive Lisp?

No.  

I said that if you went beyond those simple case, your regexp solution
would break lamentably.



-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


reply via email to

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