Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!wivax!decvax!cca!rmc From: rmc@cca.UUCP Newsgroups: net.lang.c Subject: There is a "Modular C" Message-ID: <4887@cca.UUCP> Date: Wed, 15-Jun-83 12:52:56 EDT Article-I.D.: cca.4887 Posted: Wed Jun 15 12:52:56 1983 Date-Received: Thu, 16-Jun-83 20:37:28 EDT References: uiucdcs.2222 Lines: 36 A reasonable Modular C is described in the ACM SIGPLAN NOTICES, V18 Nbr4 pp 45-54. It uses defines and specific structures to handle importing and exporting routines. Some salient features from reading the article (i have not actually used it as yet): - There is very little overhead in using it as you have basically changed the syntax for native C. - It does hide internal algorithms and data structures as advertised. - It is readable, but not as nice as Modula et al. To handle exporting and importing routines, you export a structure of pointers to the routine entry points. Thus to call "fu" one writes (*fu)(), which i suppose could be objectionable. The extra time for the indirection is probably not significant. - ADA overloading of operators and the PASCAL "with" clause are not part of C and thus code will in general contain more characters than if it were written in a language that supported "with" and overloading. - The defines necessary to use Modular C and examples of stack, queue and storage managers are included in the article so you don't have to reinvent anything, just go ahead and start coding. In general i would suggest SIGPLAN NOTICES to people interested in modern programming languages, as it contains lots of articles of small, quick implementations of new ideas suitable for trying on your own. Quite a number of them use C as the base language - an object oriented pre-processor for C comes to mind as a prime example. R Mark Chilenskas Chilenskas @ CCA-VMS (i don't read uucp addrs, so i hope the header is useful)