🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #347

Re: Re^2: Can you nest subroutines in C?

#347
From: David King
Date: Wed, 05 Jul 1989 03:20
29 lines
2014 bytes
In article <1787@softway.oz> adjg@softway.oz (Andrew Gollan) writes:
>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.

	Actually, Wirth is one of the more obscure Modula-2 programmers I've
seen.  The Pascal/Modula-2 scoping constructs are not that difficult assuming
that there is proper indenting, not having lots of variables at different
levels, and not having huge sections of code in a module - all of these I've
seen in Wirth's code at times.  The ETH compiler has one module which is half 
the compiler in size (or so I've heard from a M2 compiler writer who fiddled
with it).  On the flip side one of the most impenetrable pieces of code was
a keyed file editor written in C with no parameters declared at random
locations in files.  x, xbf, and i were common local and global vars.

	-David
>-- 
>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

-- 
 David King - 	FROM Disclaimers IMPORT Standard;
Georgia Insitute of Technology, Atlanta Georgia, 30332
uucp: ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!dsking
ARPA: dsking@pyr.gatech.edu
Technical Details
Message-ID: <8675@pyr.gatech.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!gitpyr!dsking
References: <4501@crash.cts.com> <603@laic.UUCP> <1787@softway.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!gitpyr!dsking
From: dsking@pyr.gatech.EDU ( David King)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Re^2: Can you nest subroutines in C?
Message-ID: <8675@pyr.gatech.EDU>
Date: 5 Jul 89 03:20:00 GMT
References: <4501@crash.cts.com> <603@laic.UUCP> <1787@softway.oz>
Reply-To: dsking@pyr.UUCP ( David King)
Organization: Georgia Institute of Technology
Lines: 29