Two small design issues
Posted: Wed Mar 23, 2011 8:42 pm
I see two possibilities for small design improvement, worth only if implementation is simple and there is little loss of speed.
First - extending constant so it works on local bindings as well. It is less probable that one need it, however, it is not completely impossible (especially because local binding is dynamic as well) and it would make the feature more orthogonal. Constant already works in form (constant '<variable name>).
Second - extending set so it can be applied on "implicit indexing". If
(set 'X 5) = (setf X 5)
then why not
(set '(L 1) 5) = (setf (L 1) 5)?
First - extending constant so it works on local bindings as well. It is less probable that one need it, however, it is not completely impossible (especially because local binding is dynamic as well) and it would make the feature more orthogonal. Constant already works in form (constant '<variable name>).
Second - extending set so it can be applied on "implicit indexing". If
(set 'X 5) = (setf X 5)
then why not
(set '(L 1) 5) = (setf (L 1) 5)?