[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: datatypes in Elisp Info: mention "things" for which there is no "thi
Re: datatypes in Elisp Info: mention "things" for which there is no "thing" datatype - e.g. faces
Fri, 24 Jun 2005 10:28:39 +0900
On 6/24/05, Drew Adams <address@hidden> 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
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
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.
Do not taunt Happy Fun Ball.