Why JFreeChart uses non standard for java interface naming?
Why interfaces not start with letter "I"?
It is difficult while reading code to understand what is e.g. CategoryItemLabelGenerator? Is it class? In reality it is interface.
Library interface naming
Hi,
that prefixed interface naming is a leftover from the old C++ ages. The Java class-library does not use that schema, and most projects don't use it either. When using a modern IDE, the syntax highlighting should be able to mark all occurences of interfaces, if needed.
As using interfaces is the same as using abstract classes (aside from that you have to 'implement' the one and 'extend' the other), it makes no sense to mark the type by its name here. The unclean semantics and the lack of a proper typing system in C++ may be helpfull there, but in Java this is as obsolete as declaring all used variables in C-Style at the beginning of the method.
Regards,
Thomas
that prefixed interface naming is a leftover from the old C++ ages. The Java class-library does not use that schema, and most projects don't use it either. When using a modern IDE, the syntax highlighting should be able to mark all occurences of interfaces, if needed.
As using interfaces is the same as using abstract classes (aside from that you have to 'implement' the one and 'extend' the other), it makes no sense to mark the type by its name here. The unclean semantics and the lack of a proper typing system in C++ may be helpfull there, but in Java this is as obsolete as declaring all used variables in C-Style at the beginning of the method.
Regards,
Thomas