Closed Mercerenies closed 3 years ago
Currently, set (formerly setq; cbcd68a) works on literal symbols and on access-slot as a special case. My proposal is to expand it as follows.
set
setq
access-slot
First, (set a b) (where the first argument is a literal symbol) is still special-cased to assignment in the compiler.
(set a b)
Second, for now at least, (set (access-slot a b) c) is still special-cased to assignment to an instance variable.
(set (access-slot a b) c)
Finally, (set (foo a b) c) is compiled to
(set (foo a b) c)
(set-foo c a b)
which the user can implement as a function or a macro as desired.
If we do #32, we could also implement set-assign-slot to get rid of the second special-case above.
set-assign-slot
b75acd9 implements this feature, as specified above.
Currently,
set
(formerlysetq
; cbcd68a) works on literal symbols and onaccess-slot
as a special case. My proposal is to expand it as follows.First,
(set a b)
(where the first argument is a literal symbol) is still special-cased to assignment in the compiler.Second, for now at least,
(set (access-slot a b) c)
is still special-cased to assignment to an instance variable.Finally,
(set (foo a b) c)
is compiled towhich the user can implement as a function or a macro as desired.
If we do #32, we could also implement
set-assign-slot
to get rid of the second special-case above.