News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by palata on Sunday September 17, 2023 @01:20AM (#37541768)
How do you distribute a Go library? How do you distribute a Go library that has dependencies?
Re:Java 21 makes me like Java again by mariusor on Sunday September 17, 2023 @02:21AM (#37542070)
I'm not sure if your question is rhetorical, but Go doesn't have the concept of compiled library that you can link to another binary.

So in Go you make available the library's source code, and the end-user will download it at build time, or vendor it in the source tree.

Re:Java 21 makes me like Java again by pjmlp on Sunday September 17, 2023 @03:39AM (#37542488)
Which is a non starter for businesses that don't ship source code.
Re:Java 21 makes me like Java again by lakomen on Sunday September 17, 2023 @08:55AM (#37544559)
Re:Java 21 makes me like Java again by mdaniel on Sunday September 17, 2023 @12:48PM (#37547026)
> Plugins are currently supported only on Linux, FreeBSD, and macOS, making them unsuitable for applications intended to be portable.

uh-huh

but, in all seriousness: I wonder why that is? I struggle to think of a technical reason that go would be unable to load and invoke a .dll even if one had to name it .so https://github.com/golang/go/blob/go1.21.1/src/plugin/plugin...

Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:35AM (#37552954)
Not only it doesn't work in all platforms, it uses a bare bones C API with unsafe code, and it hasn't been removed yet due to backwards compatibility, as Russ Cox already expressed his opinion that plugin was a mistake from his point of view.
Re:Java 21 makes me like Java again by ncruces on Sunday September 17, 2023 @11:16AM (#37545934)
Businesses that want to sell libraries without a source code license can ship APIs.
Re:Java 21 makes me like Java again by pjmlp on Monday September 18, 2023 @02:29AM (#37552925)
Sure, if they don't care about performance.
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @01:21AM (#37565872)
Not sure I understand what you mean here. How do I ship the API of my library without shipping the library?
Re:Java 21 makes me like Java again by palata on Tuesday September 19, 2023 @01:22AM (#37565882)
Right, so it feels like Go hasn't solved this problem. It just completely ignores it.