[M3commit] CVS Update: cm3

Olaf Wagner wagner at elegosoft.com
Tue Feb 12 22:59:42 CET 2008


Quoting Tony Hosking <hosking at cs.purdue.edu>:

> The C stuff is not intended to expose a full C API to Modula-3
> programmers.  It is there mostly for bridging to C-based libraries,
> particularly platform-specific functionality for platforms that are
> implemented in C.  Some of that bridging is done in the OS-specific
> unix subdirectories and some in the C subdirectories.  Choosing where
> to put that bridge code is a matter of style I guess, but it should
> probably be a matter of consensus among the developers of CM3.
>
> So, do folks out there have any opinions on how to best structure these
> bridging portions of m3core? I would argue for the minimum needed to
> support core M3 functionality.  Jay seems to want to throw everything
> including the kitchen sink into the core libraries.  I would argue that
> doing so makes the job of maintaining and porting Modula-3 a little
> more onerous.

I'm not sure that you are describing exactly was Jays intention was,
but as a general rule we should of course try to keep dependencies
on other languages or systems as few as possible in order to keep
portability and maintainability.

That said, I always found that there are rather a lot of things
that are system dependent and need to be imported via a system-
specific interface. One idea to improve this situation was to
provide some generic POSIX interface layer which indeed does
some of the mappings and adaptations in C. This could be just enough
to get a base system up and running. I'm not sure how popular this
idea would be within the CM3 community, and it would be some tedious
work and need some refactoring of the code. It would make porting to
new POSIX platforms much easier of course.

It would not help much on Windows platforms of course :-/

Generally I'm not against refactoring and replacing code, but we
should have a good concept and reason to do it before we start.

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3commit mailing list