DESIGN ISSUES FOR FUNCTIONS
The following design issues are specific to functions:
- Are side effects allowed?
- What types of values can be returned?
- How many values can be returned?
1. Functional Side Effects: Because of the problems of side effects of functions that are called parameters to functions should always be in-mode (actual to formal parameter).
This requirement of in mode parameter passing prevents a function from causing side effects through its parameters.
- Sebesta,”Concept of programming Language”, Pearson Edu
- Louden, “Programming Languages: Principles & Practices” , Cengage Learning
- Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill.
- E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley