emacs-devel
[Top][All Lists]
Advanced

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

Re: "simplifications"


From: David Kastrup
Subject: Re: "simplifications"
Date: Mon, 19 Nov 2007 17:02:48 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> it doesn't account for the case where
>>> you do
>>> (defsubst cadr (debug-on-error) (car (cdr debug-on-error)))
>>> in which case the optimization is not semantics preserving"
>
>> And I'n not sure it should... I think I agree with David here: if
>> you're using defsubst to optimize, you should expect some gotchas.
>
> Well, my optimization is not specific to defsubst, so it will also
> remove the let-binding in:
>
>    (let ((debug-on-error t))
>      (car (car (cdr x))))
>
>
> In any case, if you want a "fast and loose" defsubst, it's there already
> under the name defsubst*.

For a suitable value of "there":

(describe-function 'defsubst*)
Debugger entered--Lisp error: (void-function defsubst*)
  describe-function-1(defsubst*)
  describe-function(defsubst*)
  eval((describe-function (quote defsubst*)))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp)

-- 
David Kastrup




reply via email to

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