[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNU ELPA] New package: tam
From: |
Adam Porter |
Subject: |
Re: [GNU ELPA] New package: tam |
Date: |
Mon, 18 Sep 2023 14:26:56 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
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
- Re: [GNU ELPA] New package: tam, (continued)
- Re: [GNU ELPA] New package: tam, Philip Kaludercic, 2023/09/18
- Re: [GNU ELPA] New package: tam, Lynn Winebarger, 2023/09/19
- Re: [GNU ELPA] New package: tam, Philip Kaludercic, 2023/09/20
- Re: [GNU ELPA] New package: tam, Lynn Winebarger, 2023/09/20
- Re: [GNU ELPA] New package: tam, Stefan Monnier, 2023/09/20
- Re: [GNU ELPA] New package: tam, Lynn Winebarger, 2023/09/21
- Re: [GNU ELPA] New package: tam, Stefan Monnier, 2023/09/21
- Re: [GNU ELPA] New package: tam, Lynn Winebarger, 2023/09/21
- Re: [GNU ELPA] New package: tam, Stefan Monnier, 2023/09/21
- Re: [GNU ELPA] New package: tam, Philip Kaludercic, 2023/09/21
Re: [GNU ELPA] New package: tam,
Adam Porter <=
Re: [GNU ELPA] New package: tam, Stefan Monnier, 2023/09/20