Design issues for functions

April 5, 2019 · Team EasyExamNotes · 1 min read (est.) · 1 comments

Share on WhatsApp
DESIGN ISSUES FOR FUNCTIONS
The following design issues are specific to functions:
  1. Are side effects allowed?
  2. What types of values can be returned?
  3. 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:

  1. Sebesta,”Concept of programming Language”, Pearson Edu
  2. Louden, “Programming Languages: Principles & Practices” , Cengage Learning
  3. Tucker, “Programming Languages: Principles and paradigms “, Tata McGraw –Hill.
  4. E Horowitz, “Programming Languages”, 2nd Edition, Addison Wesley

Discussion

Ask a question, share your thoughts or report an error.

1 comments

  1. 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.!

Sign in to participate in the discussion.

Join the discussion