Live data from Hacker News

Python Is Easy. Go Is Simple. Simple != Easy

preslav.me

161–170 of 313 posts

Re: Python Is Easy. Go Is Simple. Simple != Easy

#161
post #37

No matter what your opinion is about Go (as a language), but they nailed it for bigger projects. Go code always looks the same, performance is predictable and fast enough for most programs, and its really, really easy to be productive. When i picked up Go i basically got shit done without ever having written a single line of Go. Its statically typed (with generics yey!) and compiles very fast. Its easy to create smal…

I used Go for many years. My issue is that it's _almost_ a great language, but in its current version it's just a collection of foot guns that makes it difficult to get shit done. Go doesn't have some of the most library functions, so large codebases shared between teams end up with a dozen different implementations of functions like "minimum" or "filter". Good luck debugging a bug in one of the implementations. The…

[deleted]

Re: Python Is Easy. Go Is Simple. Simple != Easy

#162
post #32

Earlier quoted context omitted.

The way I describe it is that Golang is optimized for reading, other languages are often optimized for writing. If you have to deal with someone else’s codebase, then Golang is a godsend. I also like that you pointed out that every Golang codebase looks the same. I think part of that is that Golang’s formatter can’t be customized. I pushed for that to happen in Rust but lost the battle.

Exactly. Code is read WAY more often than it's written. Go is verbose, that's true. And if the speed of writing code is the biggest hurdle in your productivity you're either a true 100x coder savant or deluded. Go is boring, boring is good when you need shit to work every time. And especially when you can't pick the top1% geniuses to work on it and might need to bring some rando up to speed to the project AND languag…

Go is verbose. That slows me down when I’m _reading_ code. Especially when it means the chunk of code I’m reading doesn’t fit on my screen.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#163
post #39

Earlier quoted context omitted.

IMO, Go is a mediocre language with great tooling and a great company behind it, and it turns out ultimately if you don't have the latter, the former is irrelevant.

Yes, like Python and Javascript right? Turns out you don’t need a great language when you provide what most people want: great tooling, good resources to ramp up, great stdlib, etc. Believe it or not Golang was the first language to do this, and probably still the only one? (Rust misses the mark on great stdlib)

> great stdlib

Many comments say the opposite of this. I am not too experienced, but I do know that go has a great standard library for web apps.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#164
post #5

No matter what your opinion is about Go (as a language), but they nailed it for bigger projects. Go code always looks the same, performance is predictable and fast enough for most programs, and its really, really easy to be productive. When i picked up Go i basically got shit done without ever having written a single line of Go. Its statically typed (with generics yey!) and compiles very fast. Its easy to create smal…

Don't forget the fact that it doesn't have this overbloated concept of inheritance and polymorphism of let's say Java where you have to look through 6 files to understand what's even going on. Even generics in Go were a heated debate because they make the language more complex. All in all Go was created by geniuses and it shows.

To know which interfaces a Go type implements (and so where it can be used) requires reading more, not fewer files than in Java.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#165
post #140

Earlier quoted context omitted.

mostly joking - your complaints are big problems in python. Dependency management in Go has been contentious (historically) with "to vendor or not to vendor", glide and dep, GOPATH, etc. But that is all solved. Go mod for the win. As far as "the nightmare of {using interfaces}" -- I have no clue to any controversy there. It is one of the most celebrated features of Go. Not sure where you were going with that. In Pyth…

The Python typing nightmares you refer to go away on large projects as soon as you start using mypy, which I tend to find most large projects do these days. So yes, you can change that string and you do know. It's still better that it's optional and gradual - it's unnecessary overhead on smaller projects, spikes, notebooks, etc. which are what most big projects grow out of.

Don't you need stumps which are quite often not available?

Re: Python Is Easy. Go Is Simple. Simple != Easy

#166

Anyone who appreciates the benefits of simplicity should skip Go and try functional programming instead. The basic tenets are a model of mathematical simplicity: * Values are immutable * Functions are pure (i.e. no side-effects) * Functions are values (i.e. can be passed as arguments to other functions)

Exactly what I am doing with… Python.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#167
post #128

Earlier quoted context omitted.

It was sloppy coding on the project I took over, but it still made me wish for explicit style interfaces. Cleaning up frequently broke the project in non-local ways, because someone would break an interface without meaning to.

Unless you are doing some (possibly unsafe) magic the interfaces are strongly typed, external dependencies are locked, so one cannot really break an interface without meaning to. Or I guess without realizing it immediately.

I ended up ripping out the unsafe magic, but it was a huge pain while it existed.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#168
post #5

Earlier quoted context omitted.

Don't forget the fact that it doesn't have this overbloated concept of inheritance and polymorphism of let's say Java where you have to look through 6 files to understand what's even going on. Even generics in Go were a heated debate because they make the language more complex. All in all Go was created by geniuses and it shows.

> geniuses That's very strong language. Go was created by some smart people that have completely ignored programming language developments that happened after the 70's.

Yup.

Go made a lot of odd choices from a language design perspective. It's pretty much "C, but with better types and a garbage collector!"

It certainly has its usages and does some nice things. But at the same time, the obsession with compile speed has, IMO, has been a detriment to the language as a whole. We see this in the way generics ultimately entered go after years of causing problems by not existing from the get-go.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#169
post #41

Earlier quoted context omitted.

IMO, Go is a mediocre language with great tooling and a great company behind it, and it turns out ultimately if you don't have the latter, the former is irrelevant.

I dont think there is a language better suited for containerized applications, even web servers more broadly. Is it the best at everything? No, but it got everything exactly right for its niche imo.

And also the actual container infrastructure itself.

Re: Python Is Easy. Go Is Simple. Simple != Easy

#170
post #37

Earlier quoted context omitted.

I used Go for many years. My issue is that it's _almost_ a great language, but in its current version it's just a collection of foot guns that makes it difficult to get shit done. Go doesn't have some of the most library functions, so large codebases shared between teams end up with a dozen different implementations of functions like "minimum" or "filter". Good luck debugging a bug in one of the implementations. The…

> a dozen different implementations of functions like "minimum" or "filter" this is too real and my number 1 gripe with go

And it's funny because go has a whole http server in the standard lib, but not minimum?
Post reply on HN