Live data from Hacker News

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

preslav.me

41–50 of 313 posts

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

#41

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.

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.

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

#42

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

It’s must nicer to read IMO than a generic-heavy language. Sure Golang is a bit more of a pain to write because of that but it’s a trade off.

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

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

> All in all Go was created by geniuses and it shows.

This is not necessarily a compliment to the language. I'm OK with a language created by merely somewhat smart pragmatists.

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

#44
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)

Typescript (which is 99% of current JS above toy scale) has a company behind it.

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

#45
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…

You can instantly see when the codebase is Java Coder Go or Python Coder Go, they bring their baggage to the language and it shows.

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

#46
post #33

And Clojure has "Simple made easy" [1] [1] https://www.youtube.com/watch?v=SxdOUGdseq4 -> on of Rich Hickey's best talks

I wonder why isn't Clojure more popular.

Syntax IMO. I know it's obnoxious, but the reality is most people read C like languages, not Lisp.

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

#47

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

In a former life I often bemoaned the amount of boilerplate shovel code I was having to write to move data between my underlying data models and the user interface's displaying them. So much repetitive and simple 'pick up this number, format it to two decimals, put it in this display box'. Then technologies came out featuring data binding, and patterns like MVVM to keep me from having to write all that shovel code. Instead I could just specify bindings directly in the declarative UI layer, bind it to my data object (or view object) and be done. All I had to do was learn the binding language, understand how the binding engine worked, understand the corner cases and details like the difference between one and two-way binding, etc.

Eventually the code taught me that typing, proofing and and maintaining shovel code is often easier than understanding and maintaining the magic incantations of a more 'elegant' solution. My eyes can quickly scan over boilerplate and glean what it is doing pretty quickly. But magic - magic takes understanding - and I only have so many ready spell slots.

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

#48

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.

Most developers are mediocre, so having a language that can match the skill level of the average dev is a win for many situations, no?

No. A better language would make things safer for the average dev.

You don't give the new guy at work the saw with all of the safety features removed. Or maybe you do, but you're not doing it for his benefit at least.

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

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

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

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

#50
We as a sysops / platform engineering have decided on Go and Python as our languages as well. We'll be sending the dudes to 1-2 more python courses over the next year or so, and follow that up with a few go courses as well.

We decided on that order, because the mortal part of python[1] can be picked up with less theoretical knowledge and requires less effort and knowledge to become useful imo. Like, if you know json.load, csv.load, some loops and other basics, some comprehensions, you can already do a whole bunch of useful things. And if you're a bit careful about your versions and dependencies, it can be easy to get this running on servers as well. Though you can still make your life a living hell with dependencies in python if you want to.

And later on we want to offer Go for two reasons. First - we have to support some stuff on-prem on a variety of operations systems. Here, go's simple cross-compilation saves a lot of time. And a lot of our stack is written in go - consul, vault, terraform, ... being able to read this code, or even write providers, plugins and such later on will prove useful. Go just requires a bit more programming experience in my book to actually get into, as well as to start understand larger projects.

1: I mostly mean python not touching meta classes, multiple inheritance, monkey patching, binary patching and such. Darkness lies down that path.

Post reply on HN