[fpc-devel] Delphi-like Packages, Plan
Willibald Krenn
Willibald.Krenn at gmx.at
Sun Oct 3 21:58:57 CEST 2010
Hi,
To minimize traffic, I'll answer all comments (thanks!) in this e-mail.
>> Willibald can get access to a branch to commit his work.
>
> Also an idea. But you might outline some rules for commits so that not
> the same problems happen as with DoDi's branches.
A branch would be nice, I guess. So everyone had a chance to see what I
am doing. Just to be clear about my intensions: I don't want to change
existing code. Only if there is no other way I will introduce changes,
but these will be minimized as much as possible.
> Is there a particular reason why you're sticking with TLA's?
None except that practially all files used by FPC have TLAs.
Anyways, these file extensions can be changed at any time. For now, I'll
stick to my given defs.
> is it really necessary to change extensions to ppl/ppk ?
> These formats are not compatible between Delphi anyway.
Well, I want to avoid confusion: FPC is not Delphi. Probably dpk could
stay as it is, but then I tend to think it is beneficial for everyone to
know when you are talking about dpk's you are talking about Delphi and
if you refer to ppk, it's fpc. But in the end that's not so important.
>Also you might want to add it as a new -F* option (e.g. -Fp or -FP)
>instead of -K, because the -F* options are for filenames and paths.
Sure, that's better than -K! So I will use -Fp<Name> for the package
names and -FP for defining a separate pcp search directory (if needed).
> dcp can also contain implementation part of .dcu which is .o in FPC.
Yes, they probably do. For the beginning (and with generics in mind)
it's probably easier if they do.
Regarding M1
============
>That is also more important packing everything in .ppk's exactly like
>Delphi.
Ok, so I refine my goal for M1 a little bit: Goal for M1 is to have the
compiler use the package-system, meaning one RTL (with system only), no
other .o/.ppu files, just ppl/pcp and the main.pp. Of course I am
talking about a console application (single threaded) here.
Around the same (~M1.5) time it should also be possible to re-do this
example with one fpcrtl.ppl with system unit, one other package using
exports of fpcrtl and the main application depending only on that other
package. (This would test imports for ppl's.)
>If you want this TPackageModule or whatever in system.pp (e.g in the
>RTL, not in the compiler) you should use records, because objpas.pp is
>not loaded inside system.pp (and thus TObject isn't available).
Good to know. Actually I hope I can hide the package-thing from the RTL,
which probably is a bit unrealistic ;-). Well, at least for M1 I'll
concentrate more on compiler internals than RTL aspects.
Regarding M2
============
> What do you want to mangle here? [RTTI]
RTTI for types needs to be exported, so it needs to have a name. I don't
know yet whether there already is one.
Cheers,
Willi
More information about the fpc-devel
mailing list