News for hackers. Stuff that matters.
Re:I think Zig is hard but worth it by savolai on Thursday June 01, 2023 @12:55PM (#36153966)
Would love to understand better what exactly is language specific about package managers? You would think a winner would emerge in this space like one has in version control to be used with all languages, just separate repos for different ecosystems?
Re:I think Zig is hard but worth it by vineyardmike on Thursday June 01, 2023 @01:30PM (#36154491)
Different languages do imports differently. There are different constructs for “exports” and modules and namespaces that prevent a common single directory structure.

Pip used to store packages in a global location, now most of python used a Virtual Environment per project.

Node uses a “vendor” directory within the project structure. This is probably the easiest case.

Go used to store everything globally in the “go path” but now with go modules it does something else.

Java doesn’t need source code, just single JAR files, but it needs it within the classpath.

C/++ is very flexible, but varied depending on how you build and set up your project.

Swift/ObjC requires doing whatever apple wants and dealing with their tooling.

Everything is different. If you want “one winner” the closest you get it is the system package manager (of which multiple exist) and pointing your project to its package cache. But not all system package managers handle multiple concurrent versions of the same package.

Maybe one day people will standardize against Nix which seems to be the closest?

Re:I think Zig is hard but worth it by anon84873628 on Thursday June 01, 2023 @01:30PM (#36154490)
I was also wondering this. Why does every language need to reinvent the wheel?