There is a "Modular C"

rmc at cca.UUCP rmc at cca.UUCP
Thu Jun 16 02:52:56 AEST 1983


    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)



More information about the Comp.lang.c mailing list