News for hackers. Stuff that matters.
Re:The lack of namespaces on crates.io is a feature by hinkley on Friday September 11, 2020 @01:34PM (#24445190)
Java was my introduction to namespacing, so I only suspected but didn't know for a long time that Java overdid namespacing.

Companies change names, they merge. Sometimes they go out of business but stick around as a foundation stewarding their old projects, and you might be going to example.org for years for documentation on a com.example module.

And the namespaces weren't enforced (who is going to stop me from publishing a com.example.foo module?), so it expected much and delivered little.

No namespaces is bad. Five level namespaces are better, but still bad for different reasons. Two might be good. Some might prefer three. But zero is right out.

Re:The lack of namespaces on crates.io is a feature by tasogare on Friday September 11, 2020 @07:42PM (#24448524)
I agree, the Java namespace system isn’t that good. In fact I hate it. First because it uses reverse DNS while common use of URL are in the opposite order. Second because the package sbu-namespace is enforced with the file system structure, which makes for crazy long names.

On the other hand I really like how C# and dotnet in general handle the matter. Package namespace are separated from logical (in-code) namespace. Package namespace are usually two/three dotted term, making ownership clear while not bloating the names.

Re:The lack of namespaces on crates.io is a feature by valenterry on Saturday September 12, 2020 @12:42PM (#24453658)
> First because it uses reverse DNS while common use of URL are in the opposite order.

Well, that's more a bad thing about the DNS though. "toplevel.domainname.subdomain/path" should really be how it should be structured. SUN improved this and made the hierarchy proper.

Re:The lack of namespaces on crates.io is a feature by afiori on Saturday September 12, 2020 @06:22PM (#24456396)
my understanding of DNS is that it actually uses ".tld.domain.subdomain" as a representation, it is just the URL format that mixes them up
Re:The lack of namespaces on crates.io is a feature by Symbiote on Friday September 11, 2020 @08:49PM (#24448890)
The Maven Central repository will not allow you to publish a Java package com.example.foo.