all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* datatypes in Elisp Info: mention "things" for which there is no "thing" datatype - e.g. faces
@ 2005-06-23 16:00 Drew Adams
  2005-06-23 17:24 ` Thien-Thi Nguyen
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Drew Adams @ 2005-06-23 16:00 UTC (permalink / raw)


The Elisp Info on Lisp Data Types is presented near the beginning of the
manual, as it is important, basic information. Reading this info, I see no
mention of `face'; `face' is not a datatype. A face is (`type-of') either a
symbol or a vector. Fair enough; some of the "kinds of things", such as
`face', that we reference casually are not themselves datatypes.

But I wonder if perhaps something about this shouldn't be mentioned in the
Info section on datatypes - perhaps mentioning `face' as an example of
something you might in some ways be inclined to think of as a datatype but
that Emacs treats differently from a type. Point out, in particular, that
not everything that has what might look like a type predicate is a
datatype - e.g. `facep'.

Readers can get the impression when reading the section on datatypes that it
covers all of the standard "things" we manipulate in Emacs Lisp. Looking at
the list of type predicates, a reader would never guess that faces even
exist, yet they are important things that we manipulate everyday. There is
no `face' type, but there are faces.

It might help to add a short explanation of this, including mention of
predicates like `facep' that look like, but are not really, type predicates.

What I'm suggesting is:

1) Mention that we sometimes speak casually of some things as if they were
of a particular abstract type, when there is no such type. Make readers
aware that when we speak of some things, like `buffer' and `function', there
are corresponding datatypes, and when we speak of other things, like `face',
there is no corresponding (`face') datatype. This is not obvious, and it's
not obvious which things, like `function', correspond to a datatype and
which, like `face', do not - there is nothing in the predicate names
`functionp' and `facep' that provides a clue.

(And functions, like faces, come in more than one form. It's not obvious why
`function' is considered an abstract datatype with representations as
diverse as lambda expression, keystroke command, and primitive, yet symbol
and vector are not considered the representations of an abstract `face'
datatype.)

2) Cross-reference the discussions of some of the important "non-types",
such as `face'. A reader of the datatypes section and the list of type
predicates would be helped by being made aware that there are also other
(non-primitive) kinds of things that we manipulate, and the reader should be
able to link to the doc of such important things as faces.

Obviously, there is no limit to the "kinds of things" that can exist that
have no corresponding datatype of the same name. The point is just to
mention that 1) such things can exist, and 2) `face', in particular, is one
(and cross-reference the face doc).

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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-06-25  0:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.