University of Washington • CSE583 • D. Notkin © 2000
58
More on closures
lIf you can only pass nested procedures downward (downward funarg) then there are cheaper, stack-based allocation schemes
–Ex: Pascal, Modula-3
lIf allow nested procedures but not first-class procedures, then even cheaper
–Ex: Ada
lIf allow first-class procedures but no nesting, then also cheap
–Ex: C, C++