Live data from Hacker News

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

preslav.me

11–20 of 313 posts

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

#12
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.

I remember looking through this insane taxonomy of abstractions of a button to find the code for when it got pressed. There weren’t that many buttons and they had no special requirements. Just trying not to find some real actual code that does the thing. I work on much bigger projects now with much less abstraction and my quality of life is much higher

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

#13

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…

My favorite thing about Go is that I can read a dependency’s source and there’s a very low probability that the author favors some totally different 30% of the language than I’m accustomed to, so I find it illegible without great effort. Or has imported libraries to add so many language features that it looks totally alien (fucking JavaScript—it’s getting better these days, to be fair, but there was a decade-plus when you just had no clue what you’d see when you opened up an unfamiliar codebase)

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

#14

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…

> No matter what your opinion is about Go (as a language), but they nailed it for bigger projects.

I don’t understand this template?

1. No matter your opinion on X:

2. Opinion Y is true about X!

If all you have are compliments about X: just go directly to (2). You’re not making a begrudging concession, after all.

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

#15
If you going to compare simple and easy, you've got to mention the Simple Made Easy talk by Rich Hickey. Though debatable if Rich would find Go simple in his sense of the word. An example might be not having an insertion-order map iterator.

https://www.youtube.com/watch?v=SxdOUGdseq4

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

#16

Yeah, but the amount of boilerplate one must read and write in Go is frustrating, even compared to Java.

With things like copilot, the boilerplate (if err != nil sorts of things) comes out really easily, and you can skim past it when reading. Also, I have noticed that a lot of the other stuff that people call boilerplate in Go is actually an artifact of static typing (eg having to unmarshal JSONs before querying them), and is ultimately what prevents you from having Python-style runtime crashes or weird bugs.

> With things like copilot, the boilerplate (if err != nil sorts of things) comes out really easily, and you can skim past it when reading.

Easily... but is that simple though.

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

#17
post #7

Small note: You can simplify the author's Go translation using anonymous structs: https://go.dev/play/p/4C42Ykkir8g

> an unwritten rule in programming says that if the language provides an easier (as in, more concise, more elegant) option, programmers will gravitate towards it.

and thus it was shown!

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

#19
post #8

Yeah, but the amount of boilerplate one must read and write in Go is frustrating, even compared to Java.

Huh? Having defer statements and error returns vs. dealing with exceptions gives Go the win all by itself. And then there is the business of being able to make a type automagically satisfy an interface. (Java may have fixed some of the agony of creating classes just to satisfy a required interface. Last I used Java, it didn't have delegates and whatnot.)

Go doesn't really warn you if you forget to handle an error return, which in my experience continuing silently in the face of error conditions is far scarier than crashing loudly.

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

#20

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…

> No matter what your opinion is about Go (as a language), but they nailed it for bigger projects. I don’t understand this template? 1. No matter your opinion on X: 2. Opinion Y is true about X! If all you have are compliments about X: just go directly to (2). You’re not making a begrudging concession, after all.

I think the way it's meant to be read and understood is as follows:

"There may (or may not) be many problems with Go, but building bigger projects is not one of those".

Post reply on HN