all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: Are two symbols `equal' iff they are `eq'?
Date: Sun, 09 Aug 2015 21:41:24 +0200	[thread overview]
Message-ID: <87io8os10b.fsf@mbork.pl> (raw)
In-Reply-To: <83si7spbna.fsf@gnu.org>


On 2015-08-09, at 20:19, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Sun, 09 Aug 2015 17:45:31 +0200
>> 
>> >> >From the capitalization I would guess that QUIT is a C macro.  From its
>> >> name I would guess that anything after it is irrelevant;-).  Well,
>> >> joking aside, I found its definition in the source; do I get it right
>> >> that it quits if something like C-g happens?
>> >
>> > Yes.
>> >
>> >> If yes, I'd be curious why it is here.
>> >
>> > To allow the user to interrupt a (potentially) long operation.
>> 
>> That's obvious, I just wondered why at this point.
>
> Because that point is traversed every recursion, so we check for C-g
> on each "iteration", so to say.

Ah, I see.  That does make sense.  Thanks!

>> >> Apart from that, it seems that I was right: `equal' for
>> >> symbols just calls `eq' (C EQ, not Lisp eq, to be more precise).
>> >
>> > What else could it possibly do?
>> 
>> It could e.g. compare the string representation, so two symbols with the
>> same name but in different obarrays, or one interned and the other not,
>> could be equal but not eq.
>
> I'm sure you understand how all of those would make no sense as
> "equality" of any kind.

Frankly, I don't.  I don't really have enough experience with the very
ideas of a "symbol", of "interning" and of an "obarray" (in particular,
having many of them) to see this.  I guess when I learn more Lisp (maybe
Common Lisp?), I'll see this.  But I believe you, and this is enough for
me now - I'll just try to keep that issue in my mind during my further
studies, and maybe I'll get it some day.  I'm not in a hurry, you
know;-).

>> (I'm not sure whether this would be useful, though - just a
>> thought.)
>
> If it won't be useful, why would someone do it?

If not, then not.  I agree.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



  reply	other threads:[~2015-08-09 19:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7993.1439079676.904.help-gnu-emacs@gnu.org>
2015-08-09  0:31 ` Are two symbols `equal' iff they are `eq'? Joost Kremers
2015-08-09  5:16   ` Ian Zimmerman
2015-08-09  7:30     ` Marcin Borkowski
2015-08-09 14:05       ` Michael Heerdegen
2015-08-09 15:10         ` Marcin Borkowski
2015-08-09 15:19           ` Eli Zaretskii
2015-08-09 15:45             ` Marcin Borkowski
2015-08-09 18:19               ` Eli Zaretskii
2015-08-09 19:41                 ` Marcin Borkowski [this message]
2015-08-10 15:26               ` Nicolas Richard
     [not found]   ` <mailman.8007.1439097407.904.help-gnu-emacs@gnu.org>
2015-08-09  5:21     ` Rusi
2015-08-09  5:33       ` Ian Zimmerman
2015-08-09  7:42   ` Marcin Borkowski
2015-08-09 14:03     ` Michael Heerdegen
2015-08-09 14:42       ` Marcin Borkowski
2015-08-09 14:47         ` Michael Heerdegen
     [not found]   ` <mailman.8011.1439106166.904.help-gnu-emacs@gnu.org>
2015-08-09 15:38     ` Joost Kremers
2015-08-09  0:20 Marcin Borkowski
2015-08-09  1:52 ` Emanuel Berg
2015-08-09  7:44   ` Marcin Borkowski
2015-08-09 15:28 ` Drew Adams
2015-08-09 15:46   ` Marcin Borkowski
2015-08-09 16:38     ` Drew Adams
     [not found]   ` <mailman.8032.1439135226.904.help-gnu-emacs@gnu.org>
2015-08-09 15:59     ` Stefan Monnier

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=87io8os10b.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=help-gnu-emacs@gnu.org \
    /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.