Currently, some symbols are prefixes for other symbols (like the Efl.Net.Socket interface and the Efl.Net.Socket.Tcp class).
This has no consequences in C, but it causes troubles in languages like C++, C# and Python where we want to treat each part of the symbol name as a separate namespace (Efl, Efl.Net and Efl.Net.Socket, which conflicts with the Efl.Net.Socket interface).
Clever tricks have been tested (like using upper-case and lower-case variants) but all of them look hackish and do not work everywhere. In Python, for example, the class hierarchy is replicated in the filesystem, and we cannot have a file (class) and a folder (namespace) with the same name, even if the case is different, thanks to our best-friend-forever the Windows Operating System.
Therefore, the conflicts will be solved by renaming some of the symbols, and hopefully we will end up with a more sensible class hierarchy.
In summary: EFL has 457 symbols in the EFL namespace (efl_*.eo files), of which 278 have conflicts (61%).
|Conflict type||Explanation||Fix||Example problem||Example fix|
|Sibling types||Symbols are unrelated and should not be one inside the other||Rename the symbol called like the namespace||Efl.Access, Efl.Access.Text||Efl.Access.Object, Efl.Access.Text|
|Inner type||Type2 is internal to Type1||Remove namespace and rename Type2 to Type1_Type2||Efl.Loop, Efl.Loop.Arguments||Efl.Loop, Efl.Loop_Arguments|
|Derived class||Type2 is a class derived from Type1||Add _Base to the base class and put it inside the namespace||Efl.Interpolator, Efl.Interpolator.Linear||Efl.Interpolator.Interpolator_Base, Efl.Interpolator.Linear|
|Implementation||Type2 is an implementation of Type1 (which is an interface)||Add _Iface to the interface name and put it inside the namespace||Efl.Net.Socket, Efl.Net.Socket.Fd||Efl.Net.Socket.Socket_Iface, Efl.Net.Socket.Fd|
The complete list of conflicts and proposed renames can be found in this google spreadsheet (Renames tab).
With the proposed changes, only 163 symbols need to be renamed (36%).
While waiting for feedback regarding the proposed names, I am already working in the renaming (progress can be tracked in the above spreadsheet).
Do you think that the above naming rules should be enforced by Eolian? This task should then rename all non-compliant symbols, even if they are not conflicting right now.