RRQLDR: Names matter, namespacing gives us more, better names, which means better discoverability, and minimises a source for potential non-technical bias in choosing a crate.
So you are always perfectly logical and never make a judgement based on anything other than pure, cold logic? If so, you are a better person than I and, I suspect, the overwhelming majority of humans. I know for a fact I’m influenced by names and branding, even when I’m aware of it and trying not to be influenced. The human mind is a trecherous thing, but I suppose a robot wouldn’t understand that.
(Pre-emptive note: on the off chance calling carols10cents a robot doesn’t make it clear, I’m being facetious. And anyway, some of my favourite people are robots; like CGP Grey.)
I’ve seen people use rustc_serialize over serde purely based on the name: either because the former looks more official (it’s even got “serialize” in the name!) or because the latter doesn’t say what it does and doesn’t even look relevant. Denying that names have power is silly, no matter how inconvenient it may be.
As another aside (why, oh why, can’t text be a directed graph?): the reason I said “a street in Novgorod” was that I was going to use an example of a new XML parser library I saw recently… except it’s name was so completely arbitrary, I honestly can’t remember what it was called. It might as well have been named with random syllables, or a 16-digit hexadecimal number.
This is the sort of thing I seriously worry about for crates.io: a future of arbitrarily-named and impossible to remember crates. Perhaps it would be best to explicitly say that I (and I think it’s not unreasonable to say there are others who agree with me) view the “creative package naming” that seems to frequently happen with non-namespaced package indexes as a bug, not a feature. A name should, as much as possible, say what something is and/or does. Not having namespaces appears to create (or at least contribute) to this problem, having namespaces appears to ameliorate it; thus, namespaces have merit over no-namespaces.
I interpreted that as justification for asking the question in the first place (the very next word after your quote was “Why?”), not as justification for the proposal. What’s more, the OP went on to provide an actual justifying concern: name collisions. That said, having pointed it out, I can see how it could be read in an accusatory tone, so fair enough: @RokLenarcic: carol10cents is right: just because other languages have namespaced packaging is not, itself, a reason for Rust to have it.
And that is something I believe to be a problem.
My position is that the name should not add to the user’s problems. If they see base64 and denniston, which are they more likely to pick? Ideally, they’d consider both equally, but people are lazy (conservation of effort is a perfectly reasonable thing!), and if someone’s in a hurry, are they even going to realise that denniston is an option? If they don’t check, how will they know that base64 is largely functional but minimal, whilst denniston is newer and more performant?
If they’re both called */base64, then at least it’s clear that a reasonable choice exists. They might pick one arbitrarily over the other, but at least they can’t claim “oh, I didn’t even know there was another one!” As I’ve mentioned above, I’ve seen people react with surprise to the existence of serde. If you’re looking for a serialisation library, why on earth would you even look at something called “serde”?
(That’s actually a bit unfair on “serde”; as far as I know, the name is a contraction of “serialisation, deserialisation”; kinda like “codec”. But again, cute names are dangerous.
)
If I assumed that, why on earth would I be here trying to convince people that my perspective has more merit than the alternative? I’d just sit back, safe in the knowledge that all discussions that don’t agree with my views are just sarcastic joking about how silly anyone who theoretically disagrees is (not that anyone would).
No one’s going to die if namespacing isn’t introduced, true enough.
It’s not quite on the level of “what colour should the background of crates.io be?”, though. I mean, it looks like a pool table. It’s not unpleasant, but why? I thought Rust was going for flat and sanitised, not “classy English pub”. Shouldn’t it conjure imagines of a warehouse, or even a dock?
As someone who likes organising things into neat collections, that post is horrifying.
I think they’re certainly good to have, but not a solution in and of themselves. The “Data Structures” section doesn’t list the various alternative data structures that were spun out of collect-rs. I forget all the names at the moment; they might be in another section, but that’s the one I’d expect them in.
(Also, why is “serde” in “Data Structures”? I expected to find it under “Encoding”. Why isn’t the maintainer’s brain arranged the same way mine is? 'Tis a shocking oversight, I tell you, shocking!)
Namespacing means better names, which means there’s an additional mechanism for users to find relevant crates. More discovery is a good thing (or at least, I’d hope so).
Actually, given the recent creation of stdx, it might be nice to have some sort of more formal aggregation mechanism built into crates.io. But that’s starting to sound like Steam Curators, and I’m not sure we want to go down that particular garden path…
(It stands for “Really Rather Quite Long, Didn’t Read”.)