[Top][All Lists]

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

Re: Why is booleanp defined this way?

From: Emanuel Berg
Subject: Re: Why is booleanp defined this way?
Date: Sat, 18 Apr 2015 04:23:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Rusi <address@hidden> writes:

> Elisp does not have a proper boolean type; unlike
> say symbols with symbolp, strings with stringp,
> numberp -- some union of numeric types etc.
> However programmers need boolean in their ontology
> even if (and even more if) the language does not
> support it.

I never used `booleanp' and I never experienced that
the boolean built-in type was missing from my

I think one asset with Lisp compared to for example
C is that you don't have to bother with types.

The predicates aren't types in the sense stating the
types in declarations and function definition argument
lists etc. as in C. That's just tedious and it makes
you focus on details of technology rather than solving
your problem. (But I like C as well.)

Rather the predicates add the flexibility to be able
to do different thing depending on the nature of the
data. One can see many applications...

Compare this to the generic classes of C++ where it
would instantly turn into a jungle, not to mention the
C pointers. But no one said you should do "Lisp" in C.
If you did "C" in Lisp, even Lisp wouldn't be good.

underground experts united

reply via email to

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