I'm not sure this is something we can/should guarantee between releases. Especially since you can just do:
import scala.XML.{Node=>XmlNode,_}
To resolve the ambiguity.
Given that *most* collection classed are duplicated between immutable and mutable packages, I don't see much difference here.
Thanks for the report though. I'll make sure it gets in the release notes somehow.
Personally, I would prefer to exclude privates from (at least)
wildcard imports. Admittedly, this isn't particularly regular.
In scala 2.10 there's a change that needlessly breaks a lot of code. Any file that imports scala.collection.mutable._ and scala.xml._
In that case, I'd favor renaming Node to AVLNode or something,
regardless of how bad an idea is to wildcard import
scala.collection.mutable.
Having your most common interfaces not have name conflicts is not impossible; it's good API design.
They are in many ways drop-in replacements for each other; that was the original justification I heard. Perhaps it's not very good justification (even though they do inherit from a common parent). But the Node in AVLTree and the Node in xml aren't candidates for drop-in replacement, so it's a rather different ship. If it's even a ship. Looks awfully leaky to me, more like a sieve. Can we at least stick to marginally seaworthy ships (even if we aren't totally happy with the destination)?
That's not my point (hence the "regardless"). Node is a common term
for trees and graphs, so it makes sense to make it clear that *this*
node is part of the AVL data structure right in the name, instead of
forcing you to do code spelunking.
There's no chance private imports will be fixed for 2.10. I have to spend all available cycles on desperately needed performance improvements. So rather than continuing arguing, would someone PLEASE rename the avl Node?Thanks- Martin