🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2493

Re: Request For Comment About Handling Of Globals

#2493
From: Rhys Weatherley
Date: Mon, 10 Dec 1990 23:58
27 lines
1787 bytes
In <RANG.90Dec10164012@nexus.cs.wisc.edu> rang@cs.wisc.edu (Anton Rang) writes:

>>When is a global necessary?  I think the answer is: almost never.
>  They're almost never necessary, but they can be convenient when [...]

Also, in hardware and interrupt programming (pretty vertical area,
but necessary) you can almost guarantee that the data you want to
operate on will NOT be passed as a parameter to the interrupt
handling function's entry point, but you have to get it from
somewhere!  Globals are convenient here.

>>Forget about GOTO-phobia, how about "`extern' variables considered
>>harmful?

How about "current programming methodologies and programmer thought
processes considered harmful" :-) .

>  And static variables!  And global error statuses!  <grin>

And procedures and functions since they are also globally declared!

Rhys.

+===============================+==================================+
||  Rhys Weatherley             |  The University of Queensland,  ||
||  rhys@batserver.cs.uq.oz.au  |  Australia.  G'day!!            ||
+===============================+==================================+
Technical Details
Message-ID: <6285@uqcspe.cs.uq.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!rhys
References: <242@smds.UUCP> <PCG.90Nov16161830@odin.cs.aber.ac.uk> <252@smds.UUCP> <PCG.90Nov27153408@odin.cs.aber.ac.uk> <1990Nov30.191454.29030@newcastle.ac.uk> <1990Dec7.195140.3022@arnor.uucp> <1189@ncis.tis.llnl.gov> <RANG.90Dec10164012@nexus.cs.wisc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!rhys
From: rhys@batserver.cs.uq.oz.au (Rhys Weatherley)
Newsgroups: comp.lang.misc
Subject: Re: Request For Comment About Handling Of Globals
Message-ID: <6285@uqcspe.cs.uq.oz.au>
Date: 10 Dec 90 23:58:18 GMT
References: <242@smds.UUCP> <PCG.90Nov16161830@odin.cs.aber.ac.uk>  <252@smds.UUCP> <PCG.90Nov27153408@odin.cs.aber.ac.uk>  <1990Nov30.191454.29030@newcastle.ac.uk>  <1990Dec7.195140.3022@arnor.uucp> <1189@ncis.tis.llnl.gov> <RANG.90Dec10164012@nexus.cs.wisc.edu>
Sender: news@uqcspe.cs.uq.oz.au
Reply-To: rhys@batserver.cs.uq.oz.au
Lines: 27