all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Mis-features of let
Date: Tue, 19 Apr 2005 00:31:40 -0400	[thread overview]
Message-ID: <87y8bfwgrv.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 1113882527.264397.292310@o13g2000cwo.googlegroups.com

>> Another way is to post here an example of a specific behavior which
>> you find counter intuitive (basically write a bug report, but asking
>> why it works that way, rather than claiming it's a bug ;-).

> I didn't say it *was* a bug, but "a bug waiting to happen".  Perhaps

I didn't mean to imply that you claimed it was a bug.

> thats an idiom you're not familiar with.  Sorry.  But my other
> statement should have made it clear I wasn't claiming it was a bug:

It was indeed quite clear and I understood it just fine, thank you.

> So your saying "no mention in any Elisp manual section that covers
> plists or symbol function cells about this behavior" isn't specific
> enough?

Indeed, because I have no clue what "this behavior" is.

> I'm sure your not implying I should have actually listed every section
> that refers to either of these subjects so I can't tell what more you
> expected me to cite.

No, it wouldn't have helped.

> I also expressed "The `feature' is only _implied_, not documented."
> IOW, no place (as in anywhere in the user or reference manual) do I
> find a warning or even a passing mention that a symbol, created by let
> or let* is handled differently from a symbol created through set,
> fset, any of the def... forms, intern, etc.

Show us in what way they are treated differently.  I.e. show us some elisp
code and the result(s) returned and then tell us what result you expected
instead and why.

> From what you've said (and experiments point to you being correct), no
> one should ever use put, fset, setplist etc on any symbol whose origin
> might be let or let*

No, that's not what I said.  Simply (fset <sym> <val>) has no interaction
with things like (set <sym> <val>) or (let ((<sym> <val>)) ...) and
vice versa.

> since the resulting behavior would apparently be
> undefined (as evidenced by the example in my previous post).

I see no such evidence.  Can you explain what other behavior you expected?

> Hence, a bug waiting to happen.

Think of it this way: in elisp a symbol is an object in memory with the
following 4 fields:

   name, function, value, plist

`fset' affects the `function' field, while `set' and `let' affect the
`value' field of a symbol.

A "variable" is a more abstract concept, corresponding more or less to
a location in memory holding a value.  E.g. in elisp the `value' field of
a symbol is used as a "variable".


        Stefan

  reply	other threads:[~2005-04-19  4:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18 12:56 Defadvice use Matthias
2005-04-18 17:11 ` rgb
2005-04-18 17:25   ` Johan Bockgård
2005-04-18 19:05     ` rgb
2005-04-18 19:43       ` Stefan Monnier
2005-04-19  0:15         ` rgb
2005-04-19  0:28           ` Stefan Monnier
2005-04-19  3:48             ` Mis-features of let (was Defadvice use) rgb
2005-04-19  4:31               ` Stefan Monnier [this message]
2005-04-19  6:38                 ` Mis-features of let rgb
2005-04-19 12:21                   ` Stefan Monnier
2005-04-19 20:31                     ` rgb
2005-04-19 21:45                       ` David Kastrup
2005-04-19 12:55                   ` Barry Margolin
2005-04-19 20:31                     ` rgb
2005-04-20  4:12                       ` Barry Margolin
2005-04-19 21:10                     ` rgb
2005-04-19 21:57                       ` Kevin Rodgers
2005-04-19 22:00                       ` David Kastrup
2005-04-20  1:04                         ` rgb
2005-04-20 10:04                           ` David Kastrup
2005-04-20 11:57                             ` Stefan Monnier
2005-04-20 14:41                           ` Thien-Thi Nguyen
2005-04-19  9:41               ` Thien-Thi Nguyen
2005-04-19  5:07           ` Defadvice use Barry Margolin
2005-04-18 17:52 ` Stefan Monnier
2005-04-18 21:07   ` Matthias
2005-04-18 23:20     ` Stefan Monnier
2005-04-18 20:28 ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y8bfwgrv.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.