emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: Re: proposal to make null string handling more emacs-y
Date: Wed, 25 Apr 2012 10:28:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

>> I think we should change all the core string-manipulation functions to deal
>> gracefully with nil arguments.  Specifically, I want to change the smallest
>> set of functions that may originate the infamous "wrong-type-argument
>> (stringp, nil)" error, making them instead treat nil as if it were the
>> empty string.

Being a type zealot, I'm not sure I like this idea.

This said, I'm not necessarily opposed to it.  The argument that it's
a super-common error and that it's always hard to debug doesn't convince
me (I haven't noticed it to be significantly more frequent than other
errors, nor that it's hard to debug).  BTW, we shouldn't accept "hard to
debug" as a fatality: we should try to make it easier.

So I'd like to see an actual proposed patch for one, and some further
arguments about why it would be a goo idea.

> I'm quite sure this will break gobs of existing code in Emacs.  The
> entire display engine, for starters.

I wonder what makes you think that would introduce lots of bugs,
and why in the display engine.

AFAICT this error is very rarely thrown, so turning it into some other
behavior should have very little effect, if any.


        Stefan



reply via email to

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