[Top][All Lists]

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

Re: proposal to make null string handling more emacs-y

From: Richard Stallman
Subject: Re: proposal to make null string handling more emacs-y
Date: Sat, 02 Jun 2012 23:45:47 -0400

    > The benefit of making () and false the same in Lisp is NOT a matter
    > of suppressing errors.

    Sure it is.  (null? (< 1 2)) makes no semantic sense, and you get an
    error.  In other lisps, (null (< 1 2)) makes no sense 

It does make sense.  The distinction made in Scheme between nil and false
does not exist.  `null' and `not' are equivalent; it is not a matter
of using one meaning a fallback for another.

That () and false are the same object is a feature.

    > The benefit is that we can simplify programs by knowing that () and
    > false are the same.

    Right, and you get more of these benefits if it's also the same as ""
    and as 0, and there are additional benefits in the same direction:
    allow using `nil' as a function (that returns `nil' when called),
    allow adding numbers, strings, lists, etc with implicit coercions,
    maybe allow using numbers and lists as functions (as in arc), and
    allow referring to undefined variables and calling undefined

This idea is not ridiculous, but I am not convinced the benefits are
worth the cost.

Putting these changes in Emacs Lisp (as opposed to some new system)
could lead to bad incompatibility problems.  I am pretty sure there
are things that depend on the fact that "" and nil are different

To get much benefit from nil = 0, I think we would need t = 1.

    Arguing that some of these things are better or worse is wrong.  It
    doesn't make sense to reject unifying "" and `nil' on one hand and
    reject separating false and '() on the other -- *unless* it's clear
    that it's a subjective decision.

Both of these decisions are a matter of comparing advantages.
The advantages to be compared are different in the two cases,
so there is no reason to think they should be decided alike.

Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call

reply via email to

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