Renaming existing units for one project that conflicts is not a solution/option either.
On 24 July 2010 12:52, Marco van de Voort <[email protected]> wrote: > > Delphi dotted unit names are just a prefixes with a different separator > char. Still, while no super solution, it would make duplication less likely > (avg unitname would go up), and no ugly cryptic prefixes. Does FPC support dotted unit names? eg freepascal.rtl.classes.pas freepascal.fcl.simpleipc.pas freepascal.fcl.fgl.pas then fpGUI and LCL (and any other projects) could do similar.... eg: fpgui.button.pas lcl.buttons.pas Currently fpGUI already does something similar (as I stated before) by prefixing all classes with 'Tfpg' and all units names are prefixed with 'fpg_' eg: fpg_button.pas fpg_grid.pas I did this to minimize any possible conflicts, but other projects have not done this, so they stand a much greater chance to get conflicts with FPC or other projects. I guess Object Pascal users will feel this is "weird" at first - I did too with my change in fpGUI, but you soon get used to it. The benefits outweigh with temporary "weird" factor. I would probably have preferred a "dotted" unit naming format, but I think last time I tried, FPC didn't support a dotted unit name. > Other solutions that really involve two .pas files with the same name need > something to uniquely identify them. E.g. Java does this with the location > in the classpath hierarchy, but I doubt we would go that far. Why not something like IInterface or IUnknown does by using a GUID somewhere in the unit. But then comes the problem that not all editors can generate a GUID via a keyboard shortcut - but then, how to they program with Interfaces (so maybe a GUID is not a issue). -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
