Subject: Re: bug#68244: hash-table improvements

From: Mattias Engdegård <[email-masked]>
Date: Wed, 14 Feb 2024 14:21:41 +0100

14 feb. 2024 kl. 14.05 skrev Stefan Monnier <[email-masked]>:

> BTW, my idea adjusted for the kind of compatibility you're after would
> have been to define `obarray-make` as (vector (internal-make-real-obarray))

Yes, but since most primitives would need to accept a zero-filled vector anyway (and replace the first element with an obarray object), `obarray-make` might just as well just return [0]. Essentially:

  (intern X [0 ...]) -> (intern X [NEW-OBARRAY ...]) -> (intern X NEW-OBARRAY)

  (intern-soft X [0 ...]) -> nil   ;ie, treat as empty
  (intern-soft X [OBARRAY ...]) -> (intern-soft X OBARRAY)