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.
References:
- 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
An impressive share! I’ve just forwarded this onto a coworker
who had been doing a little research on this.
And he actually bought me dinner due to the fact that I found it for him…
lol. So let me reword this…. Thanks for the meal!!
But yeah, thanks for spending the time to discuss this subject here on your site.!