Path: 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> <252@smds.UUCP> <1990Nov30.191454.29030@newcastle.ac.uk> <1990Dec7.195140.3022@arnor.uucp> <1189@ncis.tis.llnl.gov> Sender: news@uqcspe.cs.uq.oz.au Reply-To: rhys@batserver.cs.uq.oz.au Lines: 27 In 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! 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!! || +===============================+==================================+