> This might be a nice thing to add to the documentation too,
> since the function definitions don't mention it.
Sorry, I was completely wrong. The definition of set and setq Do mention
whether the first argument is evaluated or not. I just didn't notice the
quote in the form of the general functi
>The same meaning of "eq" (or "quick") have functions like 'delete' /
'delq',
>'assoc' / 'asoq', 'case' / 'casq' or 'push1' / 'push1q'.
Thank you Alex, that was exactly my next question.
On Tue, Dec 27, 2016 at 9:20 AM, Erik Gustafson
wrote:
> It is the *function* call overhead, which is relati
It is the *function* call overhead, which is relatively expensive. [...]
Thanks Alex, this is great. I'll add to the wiki article later today.
On Tue, Dec 27, 2016 at 08:49:10AM +0100, Alexander Burger wrote:
> > > On Mon, Dec 26, 2016 at 10:25 PM, Erik Gustafson <
> Thanks Erik for the great explanation and the article!
I feel I should also mention that the purpose of
(setq A 'value)
versus
(set 'A 'value)
is not at all to avo
> > On Mon, Dec 26, 2016 at 10:25 PM, Erik Gustafson <
Thanks Erik for the great explanation and the article!
On Mon, Dec 26, 2016 at 11:37:36PM -0500, Bruno Franco wrote:
> This might be a nice thing to add to the documentation too, since the
> function definitions don't mention it.
> difference
This might be a nice thing to add to the documentation too, since the
function definitions don't mention it. Maybe something like: "Its only
difference with set is that setq does not evaluate its first argument"
On Mon, Dec 26, 2016 at 11:26 PM, Bruno Franco wrote:
> Thank you so much Erik! I es
Thank you so much Erik! I especially like that you said WHY setq is named
like that. Its been bugging me for weeks!
On Mon, Dec 26, 2016 at 10:25 PM, Erik Gustafson wrote:
> Hahaha I read your post quickly and then wrote a possibly overkill answer.
>
> I deduce that setq doesn't evaluate its fir
Hahaha I read your post quickly and then wrote a possibly overkill answer.
I deduce that setq doesn't evaluate its first argument, while set does. Why
> is that?
>
You've totally got it! So the short answer is flexibility vs convience,
nothing deeper than that ;)
Cheers!
Have a look at this article:
http://picolisp.com/wiki/?evalvsnoneval
Basically, the only difference is that 'set' evaluates its first argument,
while 'setq' does not. In your example,
(set B 1)
'B' is evaluated (and returns NIL because the symbol 'B' has not yet been
given a value). 'set' th
I know that they're used to bind a variable to a value, and that they do
behave differently, but I don't understand the principle behind their
difference, and I can't predict how they will behave differently from each
other.
>From this little piece:
: (set B 1)
!? (set B 1)
NIL -- Protected symbol
10 matches
Mail list logo