Currently, information is passed down selectively, on need-to-know basis. When we realize that we need to know something extra, we need to add lots of arguments to lots of functions. Instead, it would be better to have an environment data structure that gets passed to all the functions of the compiler; if we need something else passed down, we just change the data structure (record) for the environment.
Currently, information is passed down selectively, on need-to-know basis. When we realize that we need to know something extra, we need to add lots of arguments to lots of functions. Instead, it would be better to have an environment data structure that gets passed to all the functions of the compiler; if we need something else passed down, we just change the data structure (record) for the environment.