Homework 5 solution 1. In the above code, don't worry about checked versus unchecked exceptions. Using the exception table, show how this exception is handled. Explain and give a supporting example. Thus, we cannot generate a table statically to map exceptions to exception handlers.
Closures are difficult to implement efficiently when nested functions can escape.
Consider a language that supports nested functions but wants to keep their implementation efficient by prohibiting nested functions from escaping. For each check you describe indicate clearly if it is a compile time or a run-time check. But if the return or assignment is indirect, then more work is needed. Assume that all functions are passed as closures. The Environment component of closures of global functions is empty and of nested functions is non-empty.