[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: |
Heime |
Subject: |
RE: [External] : Re: cond construct for situation when a variable is t |
Date: |
Tue, 22 Aug 2023 20:21:22 +0000 |
Sent with Proton Mail secure email.
------- Original Message -------
On Wednesday, August 23rd, 2023 at 4:17 AM, Drew Adams <drew.adams@oracle.com>
wrote:
> > 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.
The canonical convention also stipulates that the symbol
t is not to be modified to something else though, am I right ?