help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: cond construct for situation when a variable is t


From: Drew Adams
Subject: RE: [External] : Re: cond construct for situation when a variable is t
Date: Tue, 22 Aug 2023 16:17:37 +0000

> There is no 'boolean datatype' in elisp.
> With nil and empty list () being false,
> anything else is true.

There's no real true or false in Lisp.  But yes,
that's the convention, and that convention is
baked into primitive conditionals, such as `if'
and `cond'.  So sure, you can think of it as
being more than a convention.

> That t is used for true, is that by convention ?
> Should t be used, or is it unreliable ?

Just like the "convention" described above, it's
a convention.  But also just like it, it's baked
into primitives.  So yes, the constant `t' is a
typical non-nil value used by conditionals to
represent "true".  And it's the canonical way to
represent "true", meaning that it's the clearest
way to tell human readers of code that "true" is
meant.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]