Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-spam!sri-unix!quintus!ok From: ok@quintus.UUCP (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Structured design, goto's, and the holy grail Message-ID: <607@cresswell.quintus.UUCP> Date: 30 Jan 88 01:50:26 GMT References: <11528@brl-adm.ARPA> <23777@cca.CCA.COM> Organization: Quintus Computer Systems, Mountain View, CA Lines: 27 In article <23777@cca.CCA.COM>, g-rh@cca.CCA.COM (Richard Harter) writes: > Interesting issue. There is a school that holds that inter-module > communication via global data is undesirable (strong, unstructured coupling.) > This school is wrong. If procedure invocation is strictly heirarchical, > and all communication is via parameter sequences, then there are large > classes of programs which effectively cannot be written. If procedure > invocation is non-heirarchical (i.e. you can call a routine from anywhere) > and you can have variables remembered from one invocation to the next, > then a simulation of global data is trivial. (1) It's hierarchical ("hieros" = a priest; has nothing to do with "heirs"). (2) May I recommend Structured Design: Fundamentals of a Discipline of Computer Program and Systems Design Edward Yourdon/Larry L. Constantine Prentice-Hall 1979 ISBN 0-13-854471-9 This book explains various sorts of intermodule coupling quite clearly, and also some of the problems with them. The material in it goes back a few years, but it's none the worse for that. In any programming language you have to use the tools you've got. C's modularity is better than Fortran's (two routines can share a variable without having to making available to the whole world), but that isn't saying much.