[Lazarus] FPReport file names

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Sep 13 17:09:15 CEST 2017


On 2017-09-13 09:44, Michael Van Canneyt via Lazarus wrote:
> As long as there are no command-line switch and directive for setting
> namespaces, they are completely useless.

Like I said, FPC still needs a bit more work before namespaces become 
more useful (or workable like Delphi intended).


 > And even with the command-line switch, the 'namespaces stop unit name
 > conflicts'argument is of course complete nonsense.

It can greatly reduce conflicts. I would follow the Java namespace 
convention, and add a company name or organization as part of the namespace.

So fpreportexporthtml.pp would become:

   fpc.fpreport.export.html.pp

Granted that is a long unit name, but so is the original, and at least 
the dotted name reads much easier. Human minds don't read all lowercase 
or all uppercase combined words very easily - just look at MSEide's 
code. Only Martin likes that (and maybe you). ;-)

Anyway, I would suggest all FPC units are prefixed with the "fpc." 
namespace.

An example where namespaces do work well, is in tiOPF's "tiopf3" branch. 
The same unit names exist in VCL and FMX. Using namespaces as part of 
the target platform you want, it automatically helps resolve which unit 
you are referring to. So yes, we can show pros and cons to namespaces.




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 Lazarus mailing list