[fpc-pascal]Interface-only units (was: shared libraries interface)
Full_Name
memsom at post.interalpha.co.uk
Fri Aug 2 11:16:56 CEST 2002
Quoting Nikolai Zhubr <s001 at hotbox.ru>:
> Ok. Then would it make much difference to resolve them to a shared
> library instead of a static one (Optionally)?
For clases, this would be nice (somthing like packages in Delphi??) For
Procedures and Functions, can't you just add "external 'MyLib';" to the end of
the items? IIRC FPC will even allow variables to be exported, something that
Borland compilers don't do.
One other point.. surely the interface is there just for the convenience of the
developer - like a C header file. The bad thing about C header files is that
they're *required*. It would be nice to allow the pure interface to still be
optional. The compiler could simply ignore it, after all you *can't* change it
in any way because the object file is fixed. it's dangerous imho to give
developers the ability to use a pure interface and an object file, but still
allow them to add/remove symbols from the interface. Surely the point of
dcu/tpu's is that they are uneditable.. the pure interface would simply make it
easier to see what the unit exported in its interface.
Matt
--
"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music."
Kristian Wilson,
Nintendo, Inc, 1989
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s+++:+ a- C++ UL+ P L++ E---- W- N+ o+ K- w
O- M V PS PE-- Y PGP- t- 5-- X- R- tv+ b+ DI++ D+
G e++ h--- r+++ y+++
------END GEEK CODE BLOCK------
More information about the fpc-pascal
mailing list