Live data from Hacker News

Ask HN: Go programming language is over ten years old. What do you think of it?

news.ycombinator.com

111–120 of 310 posts

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#111

I find myself reaching for it over other languages when I want to build small servers with a bit of in-memory state or a bit of heavy processing. For little search-engines, Go is perfect. While writing servers in Flask + Python is much more convenient, I still prefer Go because I don't run into the limits that Python has. The development process is fluid enough that I wish the language was suited to more usecases. Wh…

OCaml is good for handling abstract syntax trees (strong typing, pattern matching) and its mix of imperative and functional programming don't require using borrow-checker nor monads. You can also consider Reason, if you prefer a more C-like syntax.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#112
post #106

I haven't studied the language yet, but when I had the need to compile and run something written in it (IIRC, it was a checker for the Heartbleed vulnerability) I disliked it. With every other language, you checkout the code in any directory you want (as long as there are no spaces in the path), run either a language-specific tool or the traditional configure/make combo to compile and optionally install, and you're d…

This is only true if you don't use go modules - so for recent projects you would not have this problem.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#113
post #106

I haven't studied the language yet, but when I had the need to compile and run something written in it (IIRC, it was a checker for the Heartbleed vulnerability) I disliked it. With every other language, you checkout the code in any directory you want (as long as there are no spaces in the path), run either a language-specific tool or the traditional configure/make combo to compile and optionally install, and you're d…

All that has changed now thankfully, no more $GOPATH, put your go projects wherever you want, and there's a decent dependency system.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#114
post #106

I haven't studied the language yet, but when I had the need to compile and run something written in it (IIRC, it was a checker for the Heartbleed vulnerability) I disliked it. With every other language, you checkout the code in any directory you want (as long as there are no spaces in the path), run either a language-specific tool or the traditional configure/make combo to compile and optionally install, and you're d…

I think you can put your project in any directory you want with go modules

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#115
post #106

I haven't studied the language yet, but when I had the need to compile and run something written in it (IIRC, it was a checker for the Heartbleed vulnerability) I disliked it. With every other language, you checkout the code in any directory you want (as long as there are no spaces in the path), run either a language-specific tool or the traditional configure/make combo to compile and optionally install, and you're d…

This is no longer the case. Now you instantiate a go module wherever you want by running “go mod init” (which just produces a trivial text file). Each module’s dependencies are now well encapsulated. There’s no longer a need for a messy globally shared GOPATH space.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#116
post #72
post #62

Earlier quoted context omitted.

> What’s difficult about this? Well, for starters, that particular multi-liner: - installs an entire package manager, which may or may not conflict with system tools or a different package manager, - assumes pyenv will build Python against the system libraries without additional flags (it won't if you're running Big Sur, you'll need zlib from Homebrew), - assumes you are on macOS, and does not attempt to work on Wind…

Plus, it does so non-reproducibly and downloads random binaries from the internet.

Which makes rolling back a bad push really interesting. Give me a append only repo with my static binaries that my compute nodes deploy from. I even went to the trouble to put Python into RPMs for this.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#117
When a struct implements an interface one has to keep guessing that it really does so (unlike Java, C++ there is nothing in the syntax of go that would show interface inheritance as a fact), and that really doesn't help the poor guys who have to read/understand/maintain some code. Why did they do that to a language that is based on interfaces?

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#118
post #102

Earlier quoted context omitted.

Go has wide enough adoption that I don’t think you can call it niche anymore. It’s become somewhat of a de-facto systems/infrastructure programming language and is replacing Python in a lot of places where it was traditionally used for automation. The language is simple, performant and writing concurrent code is intuitive (although I feel Go developers tend to get carried away using channels/goroutines).

Because every time I need to use a lock I know I am not smart enough to do so. Channels and go routines, I can reason about. (Tho they are slower - I have a runtime stats package that just stuff the numbers into a channel and then returns to the calling goroutine. I did an implementation using Atomic’s and it could sustain like 20x more calls per second before using all the callers CPU. But I still use the channel im…

Rust is ideal for this scenario: it lets you use the faster locks / atomics, and the compiler will check everything for you (assuming you can use a standard implementation rather than needing to implement your own - but there are well tested libraries for most common use cases).

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#119

We have a few go web apps to maintain and, honestly it's not a pleasant experience. - Package management is terrible. - Development on Mac is not a great experience (someone in the team purchased a paid IDE, everyone else just run everything through a docker image, are we missing something obvious?). - The language is not flexible enough (lack of generics?) and code is significantly longer. - Lots of quirks. I'm sure…

Go works fine for me on the Mac with VS Code — in fact I recently used it to develop a Windows service so I wouldn’t have to deal with Windows (except for testing, of course). The cross-compiling is really easy.

Re: Ask HN: Go programming language is over ten years old. What do you think of it?

#120

I do not like it. The lack a proper (1) Class, (2) Enums (seriously, using constants to describe a proper Enum like Java has is a must, we are in 2020 not in 1980), (3) being able to call methods on methods on nil pointers, (4) generics that are available for langauge internals but not for language users, the list could go on. All this just because I am working on it few months now. Let's see how it will evolve throu…

I think most Go people will put most anything that goes over the wire into some protocol description language like protobuf or even swagger. Inside your call stack I am not sure you need enums instead of constants. If you are either persisting or transmitting data then you want some formal description which will essentially get you enums as useful symbolic values.
Post reply on HN