[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the difference between defsubst and defun ?
From: |
Fren Zeee |
Subject: |
Re: What is the difference between defsubst and defun ? |
Date: |
Sat, 4 Dec 2010 13:46:45 -0800 (PST) |
User-agent: |
G2/1.0 |
On Dec 4, 1:19 pm, "Pascal J. Bourguignon" <p...@informatimago.com>
wrote:
> Fren Zeee <frenz...@gmail.com> writes:
> > This is a newbie question.
>
> > [Q] In emacs, What is the difference between defsubst and defun ?
>
> > I have searched and looked at the documentation but not satisfactory
> > answer.
>
> > defsubst is a Lisp macro in `byte-run'.
> > (defsubst NAME ARGLIST &rest BODY)
> > Define an inline function. The syntax is just like that of `defun'.
>
> > defun is a special form.
> > (defun NAME ARGLIST [DOCSTRING] BODY...)
>
> > Define NAME as a function.
> > The definition is (lambda ARGLIST [DOCSTRING] BODY...).
> > See also the function `interactive'.
>
> > *** What are the key attributes of the inline function in general in
> > lisp and in particular in CL and elisp ? ***
>
> (set-difference '(Define an inline function) '(Define NAME as a function))
> --> (inline an)
>
> So, I guess the difference is an inline.
>
But what does it mean in operational terms ?
How is it being represented differently at a lower layer ?
How is it acting differently and treated differently by the
interpreter ?
Its obvious that there IS A difference of name and behaviour is
indicated ?
What is that difference semantically and operationally ?
Geez