Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!murtoa.cs.mu.oz.au!munnari.oz.au!otc!metro!sunaus!softway!adjg From: adjg@softway.oz (Andrew Gollan) Newsgroups: comp.sys.amiga.tech Subject: Re^2: Can you nest subroutines in C? Message-ID: <1787@softway.oz> Date: 4 Jul 89 03:29:03 GMT References: <4501@crash.cts.com> <603@laic.UUCP> Organization: Softway Pty Ltd, Sydney, Australia Lines: 15 >> I do not understand why C does not support Nested routines. Perhaps >>this will be added to the ANSI standard at some point in the future. >Probably the biggest thing against it is the fact that it makes compilers much >more difficult to write (especially modifying existing compilers). No. The reason why C does not support nested functions is that it is a _bad_ idea. The worst piece of impenetrable rubbish I have ever tried to understand was written by Wirth in Algorithms + Data = Programs and purported to handle B-trees. It was made impossible to understand by the _complexity_ of the scoping considerations. C scoping is not perfect, maybe, but nested functions would only make it worse. -- Softway: +61 2 698 2322 Andrew Gollan adjg@softway.oz GPO Box 305, Strawberry {uunet,mcvax}!softway.oz!adjg Hills NSW 2012 Fax: +61 2 699 9174