HW3 Q5. (a) It is easier to manage state explicitly in imperative languages. For many programming tasks involving input/output, side effects are just as important as the result of a computation. Languages that support higher-level functions and garbage collection impose costs on programs that don't use these features. It is more difficult to use a language with garbage collection for performance-critical tasks where it is important to control memory management at a low level. (b) It is easier to implement imperative languages than functional languages on machines with limited disk and memory sizes. Compilers for such languages can be less complicated, because the elements of the language can translate more directly into machine instructions. (c) Functional languages require bigger executables (or bigger library functions) because runtime support is needed for higher-level functions and garbage collection. (d) In the days when every byte counted for even simple programs, imperative languages were much more practical than functional languages. (e) For some applications, these concerns are no longer important, but there are still many applications for which utilizing the hardware to the fullest is important. Also, some aspects of hardware performance (like hard disk and DRAM latencies) are not improving nearly as quickly as others, so in some cases it is even more important to give programmers control over how resources are used.