ruricolist / serapeum

Utilities beyond Alexandria
MIT License
420 stars 41 forks source link

Local function CAR-SAFE is redundant/misnamed #119

Open phoe opened 2 years ago

phoe commented 2 years ago

See #55

https://github.com/ruricolist/serapeum/blob/3e327de9def28dd763fd9be995dc54ce7edbb364/defining-types.lisp#L79

This is equivalent to ALEXANDRIA:ENSURE-CAR.

This local function's name is also a bad misnomer, since SERAPEUM:CAR-SAFE explicitly does something else than ALEXANDRIA:ENSURE-CAR in the atom case.

phoe commented 2 years ago

In terms of fixing #55, won't it be better in the long-term to get rid of the local functions and wrap the real SAFE-CAR in an EVAL-ALWAYS? The fewer local functions we have, the fewer places for bugs like that to hide in.