Two small design issues

Started by Kazimir Majorinc, March 23, 2011, 01:42:05 PM

Previous topic - Next topic

Kazimir Majorinc

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)?\">WWW site;\">blog.


Not sure what you mean in the first request. Is it this?

> (local (x) (constant 'x 123))

ERR: not allowed on local symbol in function constant : x

This was actually possible some years ago, but required extra checks for each symbol when restoring the old environment of the symbol on function exit. It was eventually taken out for efficiency/speed reasons.

Kazimir Majorinc

Yes, it was that.

If it was turned off because of efficiency issues, OK, since it is really minor issue.\">WWW site;\">blog.