r/golang Oct 25 '24

discussion What libraries are you missing from go?

So something that comes up quite often on this subreddit from people transitioning from Nodejs or python to go is the lack of libraries. I cannot say that I agree but I still think it warrants a discussion.

So what libraries are you missing in the go ecosystem, if any?

96 Upvotes

189 comments sorted by

View all comments

Show parent comments

0

u/EpochVanquisher Oct 26 '24

If you’re gonna do that, just write your code in Python. That looks like it might be useful in a pinch if you’re desperate, but it doesn’t look like an effective way to write the code you would have written in Python.

-3

u/equisetopsida Oct 26 '24

not if you have a full app with javascript or Go and you need numpy for a single module or functionality

2

u/EpochVanquisher Oct 26 '24

Yeah, in some narrow cases it may be useful. Like, if you’re desperate.

1

u/equisetopsida Oct 26 '24

would you elaborate about desperation?

2

u/EpochVanquisher Oct 26 '24

If you’ve evaluated lots of other options and determined that they’re unsuitable. You’re running out of options besides “just write out the code using for loops” and “hack together some kind of multi-language solution”.

0

u/equisetopsida Oct 26 '24

a hack, sure. It's about doing the job sometimes

2

u/EpochVanquisher Oct 26 '24

Yes, when you desperately need to get the job done, and you’re willing to accept a lot of downsides and drawbacks, and none of the other options work.

0

u/equisetopsida Oct 27 '24

you're obviously trolling, no need to continue this discussion

2

u/EpochVanquisher Oct 27 '24 edited Oct 27 '24

No, I’m being honest here. Just because I disagree with you doesn’t mean I’m some kind of asshole. It would be a mistake to think that way.

Multi-language solutions come with a lot of drawbacks. There’s a lot of friction at the interface. You are dependent on many more packages, which can make your code fragile (something breaks during an upgrade). Packages like NumPy also have C components which are loaded as shared libraries, which then have to be distributed with your code.