Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!usage.csd.unsw.oz.au!syacus!ian From: ian@syacus.acus.oz.au (Ian Joyner) Newsgroups: comp.lang.pascal Subject: Re: Goto's are okay Keywords: goto Message-ID: <1991Feb3.231920.8462@syacus.acus.oz.au> Date: 3 Feb 91 23:19:20 GMT References: <2427@bnlux0.bnl.gov> <1991Jan27.074528.23487@tygra.UUCP> <1991Jan27.185044.19856@uwasa.fi> <1991Jan28.102509.5587@tygra.UUCP> Organization: ACUS Australian Centre for Unisys Software, Sydney Lines: 21 There is yet another consideration in the goto debate. This is concurrency. The use of gotos make it difficult for a compiler to generate concurrent code. While this may not be a problem at the moment, I guess machines coming out in the next ten years will be inherently concurrent. This is also the argument against global variables. You will have to synchronise updates to globals, and if many processes are trying to update the same set of variables, this will result in a bottleneck, or worse still be error prone. Avoiding globals is easy. If you find you have the urge to put in some globals, chances are that you have found another class. If not they should all be placed in an "application" class. Of course it is impossible to avoid globals where the language isn't a suitable tool. I don't find languages that don't have gotos or globals restrictive. It will probably be common in the future, and noone will argue, because such languages make the new generation of parallel and concurrent systems possible. -- Ian Joyner ACSNet: ian@syacus.oz ACUS (Australian Centre for Unisys Software) DNS: ian@syacus.oz.au Tel 61-2-390 1328 Fax 61-2-390 1391 UUCP: ...uunet!munnari!syacus.oz