🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4095

Re: Function-prototype scope: Why?

#4095
From: halasz
Date: Sat, 23 Sep 1995 13:58
22 lines
1676 bytes
In article <811842552snz@soliton.demon.co.uk>, Ian Cargill <ian@soliton.demon.co.uk> writes
> No, it isn't even a headache.  It certainly wasn't an 'experiment', either.
> It was a deliberate choice made for well-considered reasons.  You may be 
> one of those 'poor programer' who has trouble.  Personally I have no 
> difficulty with it at all.
It _was_ an experiment: such behavior is peculiar to C.  Where els is
it permitted to refer to pointer to not known type in a function-type
declaration (I _hate_ "prototype"; ugh!)?  That it is permitted is
a good thing, but not making a special case of it is a token that the
writers waffld, and it would be honester to forbid it.

> If you are having problems, I suggest it is because you are trying 
> to subvert the standard, rather than use it.  Don't complain that 
> the push-bike is badly designed because you can't pedal it with 
> your hands!
No, it is a bicycle with a crank but no pedals or holes: it is up to the
owner to drill and tap the crank and by and install pedals.

> If you _genuinely_ believe there is a problem, post an example.  I'll 
> guarantee to be able to supply a simple and easy solution.
Your solution is to write "struct S" ere the first declaration,
and that is the problem.
Technical Details
Message-ID: <4413q2$3ni@caip.rutgers.edu>
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail
References: <43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <811842552snz@soliton.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 09:58:26 -0400
Organization: Rutgers University
Message-ID: <4413q2$3ni@caip.rutgers.edu>
References: <43cgmb$cec@news0.rain.rg.net> <43pdgk$b3i@rdsunx.crd.ge.com> <811842552snz@soliton.demon.co.uk>
NNTP-Posting-Host: caip.rutgers.edu