Article View: comp.std.c
Article #4088Re: Function-prototype scope: Why?
From: halasz
Date: Sat, 23 Sep 1995 05:22
Date: Sat, 23 Sep 1995 05:22
24 lines
1616 bytes
1616 bytes
In article <DFBsED.2H1@stdc.demon.co.uk>, clive@stdc.demon.co.uk writes : .... : I'm not totally sure how this thread started, because I plonked halsaz : some time ago (how can *anyone* post about standards with such : deliberate non-standard spelling ?). Why discuss a standard if not to change it??? : However, the <reasoning> behind function-prototype scope is extremely simple: : * Prototypes are a good thing. : * Prototypes with dummy identifiers in can be better than without, : because they're more self-documenting. : * These identifiers shouldn't pollute the file-scope namespace. : * Thus the parameters of a prototype should be in their own scope. All seems quite nice .... : The Standard's authors prefered to have a simple concept of scope rather : than one full of special cases. So tags have the same (prototype) scope : as anything else within a prototype. This means you need to first declare : the tag outside the prototype. This is trivial, and makes it clear that : the tag used here is the same as the one used elsewhere in file scope. But nou it is quite clear that that experiment has gone awry, and the lack of a special case is a headake to the poor programmer. : ....
Technical Details
Message-ID:
<4405ig$fmd@caip.rutgers.edu>Path:
arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mailReferences:
<43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <DFBsED.2H1@stdc.demon.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail From: halasz@caip.rutgers.edu Newsgroups: comp.std.c Subject: Re: Function-prototype scope: Why? Date: 23 Sep 1995 01:22:24 -0400 Organization: Rutgers University Message-ID: <4405ig$fmd@caip.rutgers.edu> References: <43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <DFBsED.2H1@stdc.demon.co.uk> NNTP-Posting-Host: caip.rutgers.edu