In this post, we will see Design Issues for Subprograms | PPL | Sebesta | design issues for subprograms, ppl, sebesta
2. Design Issues for Subprograms
Following are the Design Issues for Subprograms:
1. Are local variables statically or dynamically allocated?
2. Can subprogram definitions appear in other subprogram definitions?
3. What parameter-passing method or methods are used?
4. Are the types of the actual parameters checked against the types of the formal parameters?
5. If subprograms can be passed as parameters and subprograms can be nested, what is the referencing environment of a passed subprogram?
6. Can subprograms be overloaded?
7. Can subprograms be generic?
8. If the language allows nested subprograms, are closures supported?
A closure is a nested subprogram and its referencing environment, which together allow the subprogram to be called from anywhere in a program.
Watch following video:
Watch on YouTube: https://www.youtube.com/watch?v=JxkYyMqfhmY