unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <snogglethorpe@gmail.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: datatypes in Elisp Info: mention "things" for which there is no "thing" datatype - e.g. faces
Date: Fri, 24 Jun 2005 10:28:39 +0900	[thread overview]
Message-ID: <fc339e4a05062318283396cc2d@mail.gmail.com> (raw)
In-Reply-To: <MEEKKIABFKKDFJMPIOEBCEMKCLAA.drew.adams@oracle.com>

On 6/24/05, Drew Adams <drew.adams@oracle.com> wrote:
> Finally, I'm ignorant: Just why is `face' not treated similarly to
> `function' - why isn't `face' a datatype? If the answer expresses a general
> rule, then perhaps that rule should also  be included in the doc, to clarify
> things.

I tend to think of datatypes in lisp as being disjoint categories of
values; a value can only every have one datatype.

By this rule, a face is not a datatype.  Neither is a variable, and
really neither is a `function' (though there are distinct "function"
datatypes, for instance subrs and compiled-functions).

To be a bit looser, maybe you could say a value has a particular type
if it (1) satisfies some predicate, and (2) the predicate doesn't
depend on any state except the value itself.

This seems as if it would reflect the way people usually think -- you
could have a `function' datatype which included subrs,
compiled-functions, and lambdas, but it _wouldn't_ include fboundp
symbols; type-hierarchies like `number' and `integer' would also work
naturally.

Using that rule, `face' still wouldn't be datatype though, because the
whether a symbol (the lisp representation for a face) is a face or not
depends on external state, not just the value itself.

-Miles
-- 
Do not taunt Happy Fun Ball.

  parent reply	other threads:[~2005-06-24  1:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23 16:00 datatypes in Elisp Info: mention "things" for which there is no "thing" datatype - e.g. faces Drew Adams
2005-06-23 17:24 ` Thien-Thi Nguyen
2005-06-23 17:34   ` Drew Adams
2005-06-24  1:28 ` Miles Bader [this message]
2005-06-24 13:58   ` Drew Adams
2005-06-24 17:38   ` Kevin Rodgers
2005-06-24 18:41   ` Luc Teirlinck
2005-06-24 21:22     ` Luc Teirlinck
2005-06-24 22:16     ` Miles Bader
2005-06-24  5:36 ` Richard M. Stallman
2005-06-24  6:32   ` Kenichi Handa
2005-06-25  0:31     ` Richard M. Stallman
2005-06-24 13:58   ` datatypes in Elisp Info: mention "things" for which there is no"thing" " Drew Adams
2005-06-24 14:21   ` datatypes in Elisp Info: mention "things" for which there is no "thing" " 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=fc339e4a05062318283396cc2d@mail.gmail.com \
    --to=snogglethorpe@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).