Well it's alright if you want to use some semantic information hiding scheme. But semantics is all it is because there is nothing to stop the other functions from defining the same prototype locally. So I guess it makes life easier if everyone always plays by the rules but if they don't then it's pointless.
If you use something like Java then you don't have that problem. It's much harder to break the rules then.
But I'm saying, if you are the programmer and you know what your doing, why would you need to make such rules if you could just program the program not to do what you don't want it to.
Originally posted by: VIAN
But I'm saying, if you are the programmer and you know what your doing, why would you need to make such rules if you could just program the program not to do what you don't want it to.
Depends on the function. If the function is one that should not be called outside of the scope of your code, then you certainly don't want to expose it. The oldest excuse in the book is, "well I'm the only one writing this program, so it's ok." That excuse only works in very limited scenarios. Certainly never in the real world when working for a company.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.