[fpc-pascal] Feature announcement: default namespaces

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue May 8 10:47:46 CEST 2018


On 2018-05-06 14:45, Vojtěch Čihák wrote:
> LCLIntf, LCLProc, LCLType isn't enough? I will use dotted units only if
> there will be absolutely no other way around.
> 
> I believe it can be useful but I don't think it's "must have" (when I
> don't consider Delphi compat.). 
> 

No, it's not a "must have" or "must use", but it does have it's uses. As
was already pointed out, Delphi uses it for backwards compatibility and
allows two completely different framework to use the same unit names.
eg: VCL.Forms and FMX.Forms.

It could be used in FPC or your own library too - instead of using
IFDEFs and Include files for platform specific code, where they share
the same interface. So now you can use namespaces instead and specify
the namespace platform when you compile - similar to what you would have
done with Compile Defines.


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp



More information about the fpc-pascal mailing list