Re: private routines
- Posted by Irv Mullins <irv at ELLIJAY.COM> May 16, 1999
- 562 views
On Sun, 16 May 1999 09:27:57 GMT, Lionel Wong <eljay98 at HOTMAIL.COM> wrote: >I ask that Eu supports routines within routines (whether funcs, procs or >types). This means that we would have global, local AND private routines. > >I'd like this because sometimes I have to write lots of repeated code for >just one routine. The routine gets pretty long and less readable. > >Do you guys agree? > Pascal allows this. In the around 500,000 lines of pascal I have written, I think I used this (private routine) once or twice. I can't see that it simplifies things in any way. Perhaps you should re-examine the structure of your code. There's usually a better way that is not at first obvious. I generally try to keep all routines to < 50 lines of code (2 screens worth). That includes the "main". Whenever I exceed those limits, I know I am writing poor, hacked, and difficult to maintain code. So no, I would prefer for Rob to work on better namespacing, which is a more universal solution to this, and other problems. Regards, Irv