Yeah, that'd be really nice if it could figure out that the variable certainly doesn't have dynamic extent and tell you that you've screwed up.
Conversely, it would be nice if it could figure out that a variable certainly *is* dynamic-extent, and not require an explicit declaration. E.g. in:
(defun stupid+ (a b c) (let ((x (list a b c))) (reduce #'+ x))
it would be nice if it could automatically deduce that x can be stack allocated, because it knows it can't escape.
Yeah, that'd be really nice if it could figure out that the variable certainly doesn't have dynamic extent and tell you that you've screwed up.
Conversely, it would be nice if it could figure out that a variable certainly *is* dynamic-extent, and not require an explicit declaration. E.g. in:
(defun stupid+ (a b c)
(let ((x (list a b c)))
(reduce #'+ x))
it would be nice if it could automatically deduce that x can be stack allocated, because it knows it can't escape.