[fpc-pascal]Interface-only units (was: shared libraries interface)
Nikolai Zhubr
s001 at hotbox.ru
Fri Aug 2 20:59:35 CEST 2002
Hi
Friday, 02 August, 2002, 19:39:57, Full_Name wrote:
> just 'papers over the cracks' imo. The concept of the compiled unit is at
> fault. You're basically using a concept introduced to Turbo Pascal circa V2
> (iirc) in the early part of the 1980's. Maybe Modula or some later language
Well, yes, nobody had to bother about .so's or .dlls in 1980's perhaps :)
> Unless there is some way of verifying that the interface in untampered with (a
> third file? a checksum?) and the compiler either will not compile the source or
> at the very least issue a compiler warning, I'll not be using the feature
> personally. There are some many better ways of doing this I think (another
Hmm. Are there any checksums currently used to ensure that some unit
needs to be recompiled? I guess no, just date/time. And, if definition
and implementation were kept in separate files, the same logic could be
applied: implementation should be recompiled along with other
dependants whenever definition has changed (has more recent date/time).
This won't help in distributing closed-source units though, but I
personally don't care about that.
> idea, ADA uses 'specification/header' and 'body' to split the code.) Moving
> away from the concept of a 'Unit' would make the usage clearer/cleaner and less
> prone to problems with understanding.
I'm just looking into an ADA book - apparently yes, spec/body can be
separate there (No big surprise). IIRC modula-2 is even more clear in
this respect, and it is much closer to pascal :)) Perhaps it's worth
considering.
--
Best regards,
Nikolai Zhubr
> 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------
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list