Closed anlsh closed 4 years ago
I've reformatted the generic-cl.asd file as the formatting issues seem to be caused by a mixed use of tabs and spaces for indentation. I've replaced all tabs with spaces in that file.
As regards to the implementation of the ELT methods, theoretically this should be a trivial case for static-dispatch to optimize, with an appropriate type declaration, however the current implementations will do. In a future commit I may replace then with statically dispatched calls to the GET methods.
This PR implements
generic-cl:elt
and correspondingsetf
expanders forgeneric-cl:hash-map
andhash-table
, as I suggested in Issue #2.It also implements appropriate tests, updates the README, and fixes some formatting in
generic-cl.asd
I should note that the
(setf) elt
definitionshttps://github.com/anlsh/generic-cl/blob/aa8f2ed2e89d24d15877faabf45c27c8ecef2b33/src/cl-sequences.lisp#L52-L67
Are pretty much copied from the corresponding
generic-cl:get
definitionshttps://github.com/alex-gutev/generic-cl/blob/261f5ca6ace28643d9da8f14f22efac3b6113402/src/hash-tables.lisp#L183-L200
Doing it this way avoids another dynamic dispatch, but if we wanted to we could call those functions directly instead (maybe
static-dispatch
would even optimize the extra dispatch away for us? I don't have experience with it)