Xcode (or whatever tool you are using to do the conversion) is merely following Swift API guidelines. Specifically:
Omit needless words. Every word in a name should convey salient information at the use site.
More words may be needed to clarify intent or disambiguate meaning, but those that are redundant with information the reader already possesses should be omitted. In particular, omit words that merely repeat type information.
In the first case, the words SimpleListener
in addSimpleListener
is repeating the type of the parameter, so they are removed from the method name. However, in the second case, SimpleListener
and SimpleListening
does not look the same to whatever tool you are using, so it thinks that SimpleListener
should be kept.
In my (human) opinion though, I think the method should be named addListener
, because:
Occasionally, repeating type information is necessary to avoid ambiguity, but in general it is better to use a word that describes a parameter’s role rather than its type.
Listener
is the role of the parameter.