News for hackers. Stuff that matters.
Re:Rust is not the language for you if you don't like traits by Anaminus on Wednesday October 04, 2023 @12:16PM (#37767352)
This sort of thing is why packages should always be namespaced. Just "base64" without any additional qualifiers makes it seem more official and definitive than it actually is.
Re:Rust is not the language for you if you don't like traits by akprasad on Wednesday October 04, 2023 @12:29PM (#37767588)
Some prior discussion on namespacing packages in Rust:

https://internals.rust-lang.org/t/blog-post-no-namespaces-in...

Re:Rust is not the language for you if you don't like traits by mjw1007 on Wednesday October 04, 2023 @12:52PM (#37767997)
I get the impression that some people think of crates.io as purely a place for distributing arbitrary Rust free software, while others think it's also a place where people are building something like a community-developed "batteries included" standard library for Rust.

I think a fair amount of unpleasantness in recent years has come from this disconnect: some people think that by publishing on crates.io you're making some promises (that they might not assume simply for, say, having a repository on github).

To me, using an extremely generic name like 'base64' does suggest that you're in the second camp, and so that you might expect to have a conversation that feels more like "we're equals building this project together" than "I'm the maintainer and my judgement is all that matters".

Re:Rust is not the language for you if you don't like traits by almatabata on Wednesday October 04, 2023 @01:38PM (#37768774)
Don't all languages, that have this kind of community developed packages, have the same problem? I expect golang, npm and python to have similar issues. Python has less issues because they have a bigger standard library but if you want to do anything advanced you need third party packages.

I feel like most of these issues stem from the very young age of Rust (2015 -> v1.0). Give it a few years and these problems will stabilize as the long term crates will survive and the short term will grow stale.

Re:Rust is not the language for you if you don't like traits by ithkuil on Wednesday October 04, 2023 @04:08PM (#37770946)
Golang doesn't because all packages are namespaces by domain name (and more often that not that domain namespace ja GitHub which has its own further "org" namespacing)
Re:Rust is not the language for you if you don't like traits by paulgb on Wednesday October 04, 2023 @01:17PM (#37768427)
Great observation. This helps me reconcile the tension I feel between my “maintainers own us nothing” mentality and my disappointment with the way the base64 API issues have been handled.
Re:Rust is not the language for you if you don't like traits by kaba0 on Wednesday October 04, 2023 @01:46PM (#37768913)
I think you are right. Though I think that one can have all the benefits of the “community-developed stdlib” with the namespaces approach as well — e.g. Java’s new Date/Time API actually comes from a third-party package called jodatime, it was just so good that it found itself implemented in the standard library of java, and then later on plenty other languages as well.
Re:Rust is not the language for you if you don't like traits by steveklabnik on Wednesday October 04, 2023 @04:11PM (#37770997)
Rust has done this as well; hashbrown was an external package, but now powers HashMap and friends.
Re:Rust is not the language for you if you don't like traits by cmrdporcupine on Wednesday October 04, 2023 @01:01PM (#37768150)
Indeed. I have on occasion joked about starting a "crates-name squatting" business; pick a bunch of common names and buzzwords and hog them and give them up for $$, like domain squatters do.

I see the arguments against organization/namespacing in Rust (ala Maven or NPM) and I kinda shake my head. The reality is, crates.io is a crazy bazaar, people end up taking crate names and then abandoning their projects, leaving that name forever unusable.

e.g. at work we have an internal crate named "event" (on our internal repository) that conflicts with an abandoned public crate of the same name that hasn't had commits in 8 years. This leads to confusion if you get your cargo config wrong. But it's also kinda frustrating that this very generic name is ... lost to time now.

Re:Rust is not the language for you if you don't like traits by itishappy on Wednesday October 04, 2023 @01:44PM (#37768890)
Looks like "swmon" beat you to the punch.

https://crates.io/users/swmon

Re:Rust is not the language for you if you don't like traits by CobrastanJorji on Wednesday October 04, 2023 @02:01PM (#37769147)
It's neat how positively I can hear an idea like this and go "haha, what a fun idea," and then see it actually executed on and get a visceral "you are a terrible human" vibe, like that "Contact me if you want to use this name!" description makes me viscerally angry.
Re:Rust is not the language for you if you don't like traits by cmrdporcupine on Wednesday October 04, 2023 @01:48PM (#37768946)
That's terrible.