In our previous episode, Graeme Geldenhuys said: > // create a generic instance > lst1 := fgl.TFPGList.Create(); > > // now create a fpGUI list instance > lst2 := fpg_list.TfpgList.Create(); > > > Problem is that if the unit names clashed, there is now way around the > problem? Or is there?
Yes, renaming. And the problem of this thread is that IMHO all "solutions" that were proposed are worse than renaming. (since they involve changing all places where the unit is referenced. And even then there are significant performance downsides). 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. 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. _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
