[Top][All Lists]

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

Re: CL package serious deficiencies

From: Stefan Monnier
Subject: Re: CL package serious deficiencies
Date: Tue, 07 Feb 2012 12:36:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

>> I'd start by declaring symbol-macrolet and defsubst* as deprecated
>> (they both suffer from serious bugs, the corresponding features aren't
>> very important and no one is willing/able to fix them).
>> Of course lexical-let will be marked obsolete soon as well.
> 1. Please explain what are those bugs "defsubst*" is suffering from ? I'm
> intrigued.

defubst* performs substitution in a completely naive way without paying
attention to Lisp syntax and scoping rules.

E.g. try (defsubst* sm-foo (a b) (cons a '(a))) and then
(byte-compile '(lambda () (sm-foo 2 3))) and you'll see that both
occurrences of the `a' symbol have been replaced by 2, even though the
second is not a reference to the variable `a'.

> 2. What the hell does making "lexical-let" obsolete mean ? I guess,
> introducing true lexical scope, like in Common Lisp and Scheme?

Yup, it's in Emacs-24.

>> Fixing the setf-method handling shouldn't be that hard (basically
>> adding macroexpand-1 and making it use it).
> I have actually added `macroexpand-1' as a C subroutine, and
> `cl-macroexpand-1' function.  It seems to work well for 2 weeks now :)

Care to submit a patch for review?


reply via email to

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