emacs-devel
[Top][All Lists]
Advanced

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

Re: New lisp library -- cell.el


From: Stefan Monnier
Subject: Re: New lisp library -- cell.el
Date: Fri, 28 Feb 2020 22:30:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> I tend to keep None variant a singleton of cell-option. nil is over-overloaded
> in Lisp programming. For example, if we want to store a nullable value in the
> slot of cl-struct and we use nil as none. It's hard to differentiate "Slot is
> unintialized" and "Slot is initialized with None".

The problem here is the concept of uninitialized.  Always arrange your
constructors to initialize all fields and the problem disappears.

>> Why bother with those indirections?
> Docstring generated by `cl-defstruct` may not suitable for us. An alias to 
> make
> a meaningful doc.

Ah, that makes sense.  You might like to put a short comment to explain it.

> Or should we use (put 'cell-box-inner 'function-documentation ".....")?

I think that would be worse.


        Stefan




reply via email to

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