Path: utzoo!attcan!uunet!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: Can you nest subroutines in C? Message-ID: <4001@sugar.hackercorp.com> Date: 9 Jul 89 13:07:18 GMT References: <18215@usc.edu> <7223@cbmvax.UUCP> Organization: Sugar Land Unix - Houston Lines: 27 There have been a number of articles by various people here that attempt to minimise the importance of static declarations in C. The point is usually brought up that things like Intuition structures should really be built dynamically at run-time... which is true enough. But this is also a very minor part of the universe of things that you want to use initialised data for. Understandable, since this is an Amiga board, but it does tend to obscure the problem. Here are a few things that really belong as initialised data structures that don't belong in external files or constructors. These things are also appropriate for portable applications, so tricks like converting a data file to an object module are inappropriate: Symbol Tables. Automatically generated data, such as Yacc or Lex tables. Help messages. Conversion tables. Internal databases. The thing to consider here is that Modula requires that a program be written procedurally. There's no simple way to organise data in a declarative manner. Have a look at the Little Smalltalk on Fish Disk 37 for an example of a program that greatly benefits from initialised data. -- Peter "Have you hugged your wolf today" da Silva `-_-' ...texbell!sugar!peter, or peter@sugar.hackercorp.com 'U`