News for hackers. Stuff that matters.
Re:Why Go and Not Rust? (2019) by pram on Friday January 27, 2023 @11:31PM (#34555152)
One big thing for me is I'm actually able to maintain stuff I wrote, for a very long time. I made a Go application in version 1.5 and I've brought it up to 1.19 with very little changes. This thing is basically 'done' and its been running for the past 7 years with zero issues, with uptime usually going into a year+

On the contrary, most the Javascript I wrote in 2015 is essentially defunct. I've developed a deep dread for starting anything new in it.

Re:Why Go and Not Rust? (2019) by philosopher1234 on Saturday January 28, 2023 @12:02AM (#34555314)
I’m curious, what changes did you have to make to upgrade your go code?
Re:Why Go and Not Rust? (2019) by pram on Saturday January 28, 2023 @12:53AM (#34555554)
The two major ones were a JWT package being deprecated, and then adding go mod which didn’t exist when I started. Then some smaller go vet issues.
Re:Why Go and Not Rust? (2019) by dharmab on Saturday January 28, 2023 @04:22AM (#34556335)
I recently converted some Go code from 1.13 to 1.19, and the bulk of the work was replacing vendored dependencies with go modules and updating the CI/CD pipelines to properly cache said modules.
Re:Why Go and Not Rust? (2019) by stevekemp on Saturday January 28, 2023 @05:54AM (#34556662)
Changes I remember included updating ioutil.ReadFile() to be os.ReadFile(), and some other similar depreciations.

I've noticed over time that the various linters and vet-tools have become more strict about things that they didn't detect in the past.

But I tend to write code with reasonably high levels of coverage (in the 80-100% region) so running linters and test-cases has always been part of my approach to using go.

Re:Why Go and Not Rust? (2019) by Andys on Saturday January 28, 2023 @12:24AM (#34555412)
It also really helps having the ability for one Go program to use multiple versions of a package. Makes it easier when you come back to an old program with old dependencies and try to start working on it again.
Re:Why Go and Not Rust? (2019) by DangitBobby on Saturday January 28, 2023 @01:58AM (#34555804)
I definitely learned my lesson about lockfiles the hard way.
Re:Why Go and Not Rust? (2019) by shakow on Saturday January 28, 2023 @05:24AM (#34556553)
That's more a failure of the JS ecosystem (the JS itself from 7 years ago should run exactly the same) than anything else.

Having programs run 7 years later should be the expectation, not the unexpected.

Re:Why Go and Not Rust? (2019) by papito on Saturday January 28, 2023 @05:43AM (#34556615)
Exactly. The Javascript ecosystem is a special kind of hell. What gets me torqued is that we have an entire generation of young devs now who us old farts have to work with, and they think that the constant state of chaos and insane complexity is normal.
Re:Why Go and Not Rust? (2019) by brnewd on Saturday January 28, 2023 @12:09PM (#34559305)
Node.js api surface hasn't changed much. It has more todo with frameworks people use and adding 10k dependencies, next trying to update every week to stay on the latest version.
Re:Why Go and Not Rust? (2019) by papito on Saturday January 28, 2023 @01:14PM (#34559955)
And Node evolved much later than the other stable frameworks. I was going to use NodeJS in 2014 for a startup, but after evaluating the absolute nightmare of ways you could do async programming in JavaScript, I went with Python and Tornado, which was a callback-free, clean way of programming. It was years ahead of JavaScript in that regard, so you were ahead of the curve if you were not jailed in the JS world.

What boggled me at the time was how JS programmers had no idea that the current at the time async programming in JS was a war zone - they had no other experiences and took it as normal.

I struggled to understand what I was missing, and then I happened to find this post, and it hit pretty much every point I encountered in practice:

https://notes.ericjiang.com/posts/751

Re:Why Go and Not Rust? (2019) by sgt on Saturday January 28, 2023 @09:12AM (#34557669)
7 years - I've had that happen after 7 months! Seriously.
Re:Why Go and Not Rust? (2019) by brnewd on Saturday January 28, 2023 @12:05PM (#34559260)
I think this has more to do with the kind of software you write in JavaScript than something inherent to the language or ecosystem. Often JS is used to write web related stuff targeting the browser or other api's which have a fast pace of change. Versus a system level utility in GO that can go untouched for years on end.