Communication with the no-functional world.

Alan Grover awgrover@umich.edu
Mon, 9 Mar 1998 09:31:48 -0500


>Many people complain about types, classes, lack of litterate programs,
>et
>I think that what is badly missing in Clean is not better class system
>or user interface, but a good interface with the non-functional world.
>People often need external data bases (SQL), multimedia, sounds, graphic
>displayers, etc. All these tools would be available if one had an
>interface with C.

I agree that to truly be a language for "real world applications", the
incorporation of features to deal with foreign code is important. We must
be able to use foreign libraries, deal with foreign data structures, and
manage resources.

Foreign libraries should be useable via existing declaration files (.h for
c/c++), and existing seperately compiled modules (dynamicly linked
libraries/shared libraries and the platform's object files). Mr. Plasmeijer
has indicated that they are trying to provide this sort of ability.

Foreign data structures should also be accesible via existing declaration
files (e.g. .h for c/c++), and a mechanism needs to exist for memory
layout-control of a structure (compare with Java where this is not
permitted: all interfaces have to be repackaged in glue, limiting easy
access).

The management of resources includes being able to release them upon
garbage collection, I believe this is called a "finalizer" (and often,
"initialization is acquisition"). Requiring explicit management of
resources is very similar to the bad old days of explicit memory management.

My immediate impulse is to allow "import" of .h files, it may be better for
the language to require repackaging of interfaces in glue. I could live
with repackaging if it was well supported (documented, non-tricky, using
existing tools).


---
"Alan Grover, Technical Pb" awgrover@umich.edu
+1 (743) 647-5778
Project Leader
Health Media Research Lab, Cancer Center
5D04 North Ingalls Building, Mail Stop 0471
300 North Ingalls
Ann Arbor, MI 48109-0471