[fpc-pascal] Smart Pointers

Marco van de Voort marcov at stack.nl
Wed May 11 14:18:07 CEST 2016


In our previous episode, Maciej Izak said:
> > Some rtl-objpas units use classes, like fmtbcd.
> >
> > If you don't use fcl-base I would make it RTL, so we can use it in fcl-base
> > if needed :-)
> 
> 
> Library is low level without using anything outside RTL, IMO it should be
> part of RTL like in Delphi.

Delphi's decisions are irrelevant. (and they regroup across directories
every other version too)

There is no reason to compile these reasonably large units 3 times. The only
reason to keep them in the base RTL is because units there would need it (like a
unicode classes version)
 
> Note that I need the library as part of RTL not as package. Generics.*
> contains _LookupVtableInfo/_LookupVtableInfoEx and few other things which
> are used for my next compiler work...

Then consider spinning that out to a lower level unit. It is not a reason to
stuff everything and the kitchen sink in the RTL.

> Generics.* as package will complicate all my plans -,- . If it can't be
> part of RTL, more comfortable for me is excluding whole library from FPC
> (easier maintenance of FreePascal fork...)

In forks you are free to modify and move whatever you want. Usually in cases
like this the developer doesn't want to use the more conservative version
packaged with FPC, but one with a quick feedback with own changes.

And isolated in a package they are more easily disabled (edit one fpmake)
then in the RTL (edit all targets makefiles)



More information about the fpc-pascal mailing list