[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the difference between defsubst and defun ?
From: |
Pascal J. Bourguignon |
Subject: |
Re: What is the difference between defsubst and defun ? |
Date: |
Sat, 04 Dec 2010 23:43:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Fren Zeee <frenzeee@gmail.com> writes:
> 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 ?
Why should we answer to trivial questions that are better answered by
google or wikipedia?
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.