Glynn Clements <glynn(a)sensei.co.uk> writes:
> I don't understand the relevance of your question. My point
was that
> for proper lexical scope it is not enough to add a new C-level
> lexical-let and lexical-let*, but that we need to provide the lexical
> scope semantics everywhere.
What I'm saying is: supposing elisp supported both lexical and
dynamic binding. We couldn't just change `let' to be lexically
scoped without breaking large amounts of code. However, we could
probably change function arguments to be lexically scoped without
breaking anything.
Oh, I see what you mean now.
I agree with the latter statement, but not with the former -- I don't
think large amounts of code use dynamical scoping without properly
defvarring the symbols. I may be wrong, though; I wish there was a
better way to substantiate this claim.
From a more purist point of view, it seems very unclean to introduce
lexical scoping for parameters, do/loop/condition-case forms and such,
but keep dynamic scoping with `let'. I am not sure how much
theoretical purism counts, but a study of this should be done to
search for real problems before we implement anything.
Personally, I would have thought that function calls account for
more dynamic bindings than explicit let forms. I also suspect that
most of the cases where dynamic binding is required for backwards
compatibility are explicit let forms.
I agree with both your observations.
--
Hrvoje Niksic <hniksic(a)srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Memory is like an orgasm. It's a lot better if you don't have to
fake it." -- Seymour Cray, on virtual memory