From: Adam Porter <adam@alphapapa.net>
To: owinebar@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: [GNU ELPA] New package: tam
Date: Mon, 18 Sep 2023 14:26:56 -0500 [thread overview]
Message-ID: <b2774a80-3bdc-36a1-a710-4d4c5a2ac303@alphapapa.net> (raw)
In-Reply-To: <CAM=F=bD9fRXagHLwi8_Hp6FRmMEuRcN6wtQEriYAWP7JSZRW1A@mail.gmail.com>
Hi Lynn,
This looks like a very interesting package. My only feedback is
trivial: that the names of the functions could omit "table" from their
names, because it would make them more concise; and since they all
operate on tables, it doesn't seem necessary for their names to specify
that.
So, e.g., instead of:
;; (tam-create-table N) => table of size N
;; (tam-table-fullp TABLE) => nil unless TABLE is full
;; (tam-table-emptyp TABLE) => nil unless TABLE is empty
;; (tam-table-size TABLE) => number of slots in TABLE
;; (tam-table-used TABLE) => number of slots of TABLE in use
;; (tam-table-get TABLE IDX) => contents of TABLE slot at index IDX
;; (tam-allocate TABLE OBJ) =>
;; if not full, assigns OBJ to contents of a free slot in TABLE,
;; and returns the index of the slot
;; if full, returns nil
;; (tam-free TABLE INDEX) =>
;; if slot at INDEX of TABLE is in use, move to the free list and
;; return the object formerly held by the slot
;; if slot is already free, signal an error
;; (tam-table-free-list TABLE) => list of free indices in TABLE
;; (tam-table-live-list TABLE) => list of in-use indices in TABLE
It could be:
;; (tam-create N) => table of size N
;; (tam-fullp TABLE) => nil unless TABLE is full
;; (tam-emptyp TABLE) => nil unless TABLE is empty
;; (tam-size TABLE) => number of slots in TABLE
;; (tam-used TABLE) => number of slots of TABLE in use
;; (tam-get TABLE IDX) => contents of TABLE slot at index IDX
;; (tam-allocate TABLE OBJ) =>
;; if not full, assigns OBJ to contents of a free slot in TABLE,
;; and returns the index of the slot
;; if full, returns nil
;; (tam-free TABLE INDEX) =>
;; if slot at INDEX of TABLE is in use, move to the free list and
;; return the object formerly held by the slot
;; if slot is already free, signal an error
;; (tam-free-list TABLE) => list of free indices in TABLE
;; (tam-live-list TABLE) => list of in-use indices in TABLE
That 6-fewer-characters could sometimes make the difference between a
form fitting on one line or two. :)
Thanks for this contribution.
Adam
next prev parent reply other threads:[~2023-09-18 19:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 2:28 [GNU ELPA] New package: tam Lynn Winebarger
2023-09-18 9:37 ` Philip Kaludercic
2023-09-18 16:22 ` Lynn Winebarger
2023-09-18 17:02 ` Philip Kaludercic
2023-09-19 15:38 ` Lynn Winebarger
2023-09-20 8:26 ` Philip Kaludercic
2023-09-20 16:14 ` Lynn Winebarger
2023-09-20 17:30 ` Stefan Monnier via Emacs development discussions.
2023-09-21 4:21 ` Lynn Winebarger
2023-09-21 13:59 ` Stefan Monnier
2023-09-22 3:01 ` Lynn Winebarger
2023-09-22 3:23 ` Stefan Monnier
2023-09-21 16:38 ` Philip Kaludercic
2023-09-18 19:26 ` Adam Porter [this message]
2023-09-19 15:48 ` Lynn Winebarger
2023-09-19 16:29 ` Adam Porter
2023-09-21 20:26 ` Richard Stallman
2023-09-22 19:45 ` Adam Porter
2023-09-20 16:06 ` Stefan Monnier
2023-09-20 16:44 ` Lynn Winebarger
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2774a80-3bdc-36a1-a710-4d4c5a2ac303@alphapapa.net \
--to=adam@alphapapa.net \
--cc=emacs-devel@gnu.org \
--cc=owinebar@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).