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

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

Re: What does the coding system nil mean?


From: Stefan Monnier
Subject: Re: What does the coding system nil mean?
Date: Mon, 26 Jan 2004 15:07:48 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> It's a coding system in the sense that every primitive that accepts a
> coding system symbol also accepts nil.

Try (coding-system-doc-string nil) ;-)

>> Though, I think it's a bit odd for a predicate called
>> `coding-system-p' to return t for an object that is _not_ in fact a
>> coding system.

> IMHO, it's no more odd than this:

>    M-: (listp nil) RET => t

Given the fact that the only empty list is nil, I don't find it too odd.
As a former Schemer, I'd agree that it would make sense to introduce a real
empty list constant and stop overloading the meaning of nil, but it's
unlikely to happen.
For coding-systems, you can use `no-conversion' in place of nil, and there
was no historical reason to overload the meaning of nil here.


        Stefan


reply via email to

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