I ran into this issue yet again today with two packages where both defined the 
'verb' "title". It cost me more time than I wanted to spend to figure out what 
the issue was. Both modules of code worked in isolation and both worked 
together in another package until I added a method call "title" (to the third 
package) as part of a fairly large change. Since these verbs both referenced 
different types defined in their own modules they could never be ambiguous and 
yet now I'm forced to prefix them with the module name and yet for other verbs 
which happen to not collide today I do not have to do this. 

In this case the verb even means semantically the same thing. Should two 
unrelated and independently developed package be forced to co-ordinate over 
common verbs? If the verb title were in Base all would be golden and nobody 
would be the wiser.

The code is now ugly, some calls have to be prefixed some not depending on 
where the collisions are. 

I'm grateful that this can be fixed by explicit merges but I am yet to be 
convinced that the default behavior today follows the axiom of least surprise. 
If you define verbs against a type you are not defining in your module then all 
bets are off, but where the type is contained in the same module as the verb 
and the verb references the type there just isn't an ambiguity so why force the 
namespace?

Reply via email to