Re: “which functions are meant as internal or external. Function names get exhausted..."
And that (among other reasons) is why you need to be able to nest subroutines: Declare functions and procedures within each other.
The only class of languages I am certain you are able to do that in are the Pascal-descendant ones.