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

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

Re: How close is elisp to CL now?


From: WJ
Subject: Re: How close is elisp to CL now?
Date: 12 Dec 2012 01:01:13 GMT
User-agent: XanaNews/1.18.1.6

Didier Verna wrote:

>   Lexical scope brings Emacs Lisp closer to any sane Lisp (which
>   should be lexically scoped by default[1]). This, in fact, has little
>   to do with Common Lisp. One could even argue that it is the opposite,
>   since one disctinctive feature of Common Lisp is precisely to offer
>   dynamic scoping, provided that you ask for it explicitely.

The CL package adds some features that go beyond CL.

EMACS Lisp:

(require 'cl)
(defun* foo ((name (sex (age))))
  (list age sex name))
(foo '(John (male (33))))

==> (33 male John)

Common Lisp:

(defun foo ((name (sex (age))))
  (list age sex name))

; in: LAMBDA NIL
;     (SB-INT:NAMED-LAMBDA FOO
;         ((NAME (SEX (AGE))))
;       (BLOCK FOO (LIST AGE SEX NAME)))
; ==>
;   #'(SB-INT:NAMED-LAMBDA FOO
;         ((NAME (SEX (AGE))))
;       (BLOCK FOO (LIST AGE SEX NAME)))
;
; caught ERROR:
;   Required argument is not a symbol: (NAME (SEX (AGE)))
 



reply via email to

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