Live data from Hacker News

Go's Sweet 16

go.dev

71–80 of 280 posts

Re: Go's Sweet 16

#71

I know they say that your programming language isn't the bottleneck, but I remember sitting there being frustrated as a young dev that I couldn't parse faster in the languages I was using when I learned about Go. It took a few more years before I actually got around to learning it and I have to say I've never picked up a language so quickly. (Which makes sense, it's got the smallest language spec of any of them) I'm…

Similar story for me. I was looking for a language that just got out of the way. That didn’t require me to learn a full imparable DSL just to add a few dependencies and which could easily produce some artifact that I could share around without needing to make sure the target machine had all the right dependencies installed.

Re: Go's Sweet 16

#72

Go would probably be my favorite language if it just had a few more features around functional programming. Specifically around immutability and nullness, and maybe exhaustive switch statements. Then it just might be perfect. At work we use Uber’s NillAway, so that helps bit. https://github.com/uber-go/nilaway Though actually having the type system handle it would be nicer.

Go with Sum types and no nil pointers would be fantastic! Is it too much to dream of? It feels like Gleam gets pretty close but it flies off in a bunch of other directions.

Re: Go's Sweet 16

#73

I just can’t get over the idiotic syntax. Instead of “int x” You have “var x int” Which obscures the type, making it harder to read the code. The only justification is that 16 years ago, some guy thought he was being clever. For 99.99% of code, it’s a worse syntax. Nobody does eight levels of pointer redirection in typical everyday code.

I prefer this, especially for more complex types like functions- https://go.dev/blog/declaration-syntax gives an overview of their thought process

Re: Go's Sweet 16

#74
post #61

Earlier quoted context omitted.

Just an anecdote and not necessarily generalizable, but I can at least give one example: I'm in academia doing ML research where, for all intents and purposes, we work exclusively in Python. We had a massive CSV dataset which required sorting, filtering, and other data transformations. Without getting into details, we had to rerun the entire process when new data came in roughly every week. Even using every trick to…

Did you try scipy/numpy or any python library with a compiled implementation before picking up Go?

Of course, but the dataset was mostly strings that needed to be cross-referenced with GIS data. Tried every library under the sun. The greatest speed up I got was using polars to process the mostly-string CSVs, but didn't help much. With that said, I think polars was also just released when we were working with that dataset and I'm sure there's been a lot of performance improvements since then.

Re: Go's Sweet 16

#75
post #37

Earlier quoted context omitted.

I've been writing go professionally for about ten years, and with go I regularly find myself saying "this is pretty boring", followed by "but that's a good thing" because I'm pretty sure that I won't do anything in a go program that would cause the other team members much trouble if I were to get run over by a bus or die of boredom. In contrast writing C++ feels like solving an endless series of puzzles, and there is…

Go is okay. I don't hate it but I certainly don't love it. The packaging story is better than c++ or python but that's not saying much, the way it handles private repos is a colossal pain, and the fact that originally you had to have everything under one particular blessed directory and modules were an afterthought sure speaks volumes about the critical thinking (or lack thereof) that went into the design. Also I mis…

When Go was new, having better package management than Python and C++ was saying a lot. I’m sure Go wasn’t the first, but there weren’t many mainstream languages that didn’t make you learn some imperative DSL just to add dependencies.

Re: Go's Sweet 16

#76
It has been my go to language since 2020. I was given a task to complete in a week and my lead told just go through Go playground and write the code (it was some snmp receiver/transmit stuff). To my surprise it was so easy to learn, write and more importantly test. Only recent thing i have not learned is generics, hopefully will get their sooner. Coming from java background the things Go did felt so clever and just too good to believe

Re: Go's Sweet 16

#77

Earlier quoted context omitted.

Go is okay. I don't hate it but I certainly don't love it. The packaging story is better than c++ or python but that's not saying much, the way it handles private repos is a colossal pain, and the fact that originally you had to have everything under one particular blessed directory and modules were an afterthought sure speaks volumes about the critical thinking (or lack thereof) that went into the design. Also I mis…

When Go was new, having better package management than Python and C++ was saying a lot. I’m sure Go wasn’t the first, but there weren’t many mainstream languages that didn’t make you learn some imperative DSL just to add dependencies.

Sure, but all those languages didn't have the psychotic design that mandated all your code lives under $GOPATH for the first several versions.

I'm not saying it's awful, it's just a pretty mid language, is all.

Re: Go's Sweet 16

#78

Earlier quoted context omitted.

When Go was new, having better package management than Python and C++ was saying a lot. I’m sure Go wasn’t the first, but there weren’t many mainstream languages that didn’t make you learn some imperative DSL just to add dependencies.

Sure, but all those languages didn't have the psychotic design that mandated all your code lives under $GOPATH for the first several versions. I'm not saying it's awful, it's just a pretty mid language, is all.

The language has changed a lot since then. Give it a fresh look sometime.

Re: Go's Sweet 16

#79
I'm thankful for Go because it was an easy first introduction to static typing.

I remember making a little web app and seeing the type errors pop up magically in all he right places where I missed things in my structs. It was a life-changing experience.

Re: Go's Sweet 16

#80
post #31

Contributing to a new Go codebase is easy. The Go codebases look all alike. Not only the language has really few primitives but also the code conventions enforced by standard library, gofmt, and golangci-lint implies that the structure of code bases are very similar. Many language communities can't even agree on the build tooling.

i've just started learning Go and i really like this aspect. one way to do things, one way to format.. the % operator is a bit confusing for a negative number - that took me down a little rabbit-hole, learning about how a remainder can be different to how i normally think about it.
Post reply on HN