Live data from Hacker News

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

preslav.me

71–80 of 313 posts

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

#71

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…

As someone with the misfortune of inheriting a million plus loc Go project I disagree. Go is a nightmare from the duck typing to dependency management.

I think you typed "python" wrong :) Duck typing is a python thing. And the dependency management is a nightmare, constantly breaking. To the article's point - you _must_ run it in a container and defer to the OS to have anything resembling a sane development story.

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

#72

Earlier quoted context omitted.

It's very simple. It's explicit and tells you exactly how errors are handled (if you care), and it follows a very common pattern that is easy to ignore when you don't want to know how errors are handled. Simple and concise are two very different things. In comparison, languages with exceptions give you a minefield around every function call.

Ok. Then I will spell it out: using an LLM to generate code is not remotely simple.

I will spell it out for you: Almost every language in the world has some sort of template-based autocomplete for common boilerplate that is often used, from class definition templates to if statements. If you aren't using one of these, you're probably working unproductively by thinking about all of your boilerplate instead of just taking it off the shelf. Copilot and its ilk just take this one step further by effectively giving you the same thing but with the slots in the template filled in. I could have said that "with autocomplete it's easy to write" and it would have the same meaning.

The presence or absence of boilerplate (and thus the presence/usability of autocomplete systems) does not imply anything about simplicity.

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

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

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

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

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

> 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 Several Go codebases I've worked on would like a word. Some Go people really love their interfaces and abstractions and making sure every method is only 3 lines and pretty soon you're 20 files and three type hierarchies deep trying to figure out what a…

Yeah, you just described every Go project. Reading Go code is a nightmare of frustrations.

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

#75

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…

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.

Yeah, I also think people index too hard on the language itself, when the runtime, tooling, and ecosystem are all much more important. Moreover, I think "mediocre" is a good thing so long as it means "fewer features" or "simple". I'm kind of glad Go is a mediocre language in this sense, because it gets out of the way. And Go's runtime is similarly "mediocre"--it's fast enough for 99% of applications, it doesn't use a ton of memory by default, the default GC is low latency, goroutines far easier to use than async/await, all it needs is a Linux kernel (no userland dependencies), and it's all small enough to fit in a static binary. Go also has a pretty good standard library too; no need to pull in dependencies just to marshal JSON or make HTTP requests, and everything compiles to static binaries by default so distributing CLI tools internally is a breeze.

Go isn't the best at anything, but it gets 80-90% of the way there on everything whereas other languages aim for 100% in one dimension (e.g., performance, static analysis) at the expense of all other considerations (e.g., usability).

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

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

Ironically, we had more advanced languages than Go in the 70s.

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

#77
post #32

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…

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.

Brainfuck is also super easy to read, and all codebases look the same. That's not a good thing. A language optimized for reading wouldn't clutter most of a screen with "if err != nil". Something like Rust's `?` would be a far better option.

Agree that the limited formatting options is nice, though.

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

#78
post #66

Earlier quoted context omitted.

As someone with the misfortune of inheriting a million plus loc Go project I disagree. Go is a nightmare from the duck typing to dependency management.

I assume with the duck typing you are talking about interfaces? How has that caused issues? With huge projects that pull in packages i have seen the dependency management become a mess but most of the time its not that bad.

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.

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

#79

Earlier quoted context omitted.

Ok. Then I will spell it out: using an LLM to generate code is not remotely simple.

I will spell it out for you: Almost every language in the world has some sort of template-based autocomplete for common boilerplate that is often used, from class definition templates to if statements. If you aren't using one of these, you're probably working unproductively by thinking about all of your boilerplate instead of just taking it off the shelf. Copilot and its ilk just take this one step further by effecti…

> I will spell it out for you: Almost every language in the world has some sort of template-based autocomplete for common boilerplate that is often used, from class definition templates to if statements.

Which is very conceptually simple. `sout` in Intellij creating Java `println(...)` is very simple. Completely straightforward. Unlike LLMs.

- Go is simple!

- Great, but it takes a while for me to produce code in Go.

- No problem, just use an LLM to help you write it!

I felt that there was a 20% chance that you were being satirical.

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

#80

Earlier quoted context omitted.

As someone with the misfortune of inheriting a million plus loc Go project I disagree. Go is a nightmare from the duck typing to dependency management.

To be fair, most million plus LOC projects match “misfortune” and “nightmare”.

Go is verbose, a million plus LOC doesn't go as far as it would otherwise.
Post reply on HN