From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Zhu Zihao <all_but_last@163.com>
Cc: emacs-devel@gnu.org
Subject: Re: New lisp library -- cell.el
Date: Fri, 28 Feb 2020 22:30:47 -0500 [thread overview]
Message-ID: <jwvh7za6pj7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <875zfqejtm.wl-all_but_last@163.com> (Zhu Zihao's message of "Sat, 29 Feb 2020 00:51:49 +0800")
> 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
next prev parent reply other threads:[~2020-02-29 3:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 6:21 New lisp library -- cell.el Zhu Zihao
2020-02-28 8:51 ` Zhu Zihao
2020-02-28 15:43 ` New " Stefan Monnier
2020-02-28 16:51 ` Zhu Zihao
2020-02-29 3:30 ` Stefan Monnier [this message]
2020-02-29 6:48 ` Zhu Zihao
2020-02-29 14:09 ` Stefan Monnier
2020-03-01 7:43 ` Zhu Zihao
2020-03-05 15:52 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvh7za6pj7.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=all_but_last@163.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.