Thursday, July 30, 2009

What is gained in C languages by not allowing functions to be defined inside functions?

This is left out strictly for simplicity. gcc implements "nested functions" as do other commercial compilers (for compatability with code written for gcc)

What is gained in C languages by not allowing functions to be defined inside functions?
there is a concept called modularity, which speaks about how cohesive and independent the reusable component (in our case the function) are.


so defining a function within a function increases dependancy and decreases reusabiltiy of a function within another function.


No comments:

Post a Comment