Earlier quoted context omitted.
> 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?
Python Is Easy. Go Is Simple. Simple != Easy
201–210 of 313 posts
Re: Python Is Easy. Go Is Simple. Simple != Easy
#202Yeah, but the amount of boilerplate one must read and write in Go is frustrating, even compared to Java.
Java boilerplate is way worse AND hidden behind annotations and so many level of abstractions!
Re: Python Is Easy. Go Is Simple. Simple != Easy
#203The sad thing is that many people make language decisions on the beginner topics like syntax , literals, hello world or trivial samples. Sure a 20 line python app will be 40 lines in Golang, but that doesn’t mean 10k lines of python are 20k lines in golang. And there are way more serious considerations than LOC. Golang concurrency is amazing. You can reproduce an entire multi-core application stack with concurrent IO…
My experience translating a codebase from Python to Golang (chat application), is that 20k of Python really does translate to around 40k of Golang to get the same functionality. And it’s not just due to language but also expressiveness of the library ecosystem.
I don't think this is necessarily a bad thing though; Go is a bit more explicit on a number of things and there's less opportunity to make code 'dense'. Both have their own up- and downsides.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#204Earlier quoted context omitted.
I think the key question is how robust a type system can be while keeping compilation extremely fast. Slow compilation absolutely destroys developer productivity.
You can make it pretty darn robust! OCaml compiles very quickly and has a good type system. Rust is slow due to LLVM, macros, and the compilation unit being the entire crate. None of these are requirements for a good type system
Re: Python Is Easy. Go Is Simple. Simple != Easy
#205Earlier quoted context omitted.
I can understand why you felt the need to share that, but if you only used it for about a day, aren’t you just reporting your initial impressions? If I used Rust for about a day, I would probably complain about the borrow checker. And if I used Python for about a day, I would have no idea what people are talking about when they complain about package management in Python.
It's pretty clear what the payoff is for the investment in using a borrow checker, and it's quite big. Less so for writing if err != nil on every. other. line. That's just an unnecessary nuisance.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#206Earlier quoted context omitted.
I think the key question is how robust a type system can be while keeping compilation extremely fast. Slow compilation absolutely destroys developer productivity.
Yep this is one of the reasons lots of my friends switched to Go: short compilation time (like good old Pascal days). Rust & Haskell is a big no :p
Re: Python Is Easy. Go Is Simple. Simple != Easy
#207Earlier 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…
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". Does https://pkg.go.dev/slices#DeleteFunc not work for you or do you need it to be called filter? It's there for maps too https://pkg.go.dev/maps#DeleteFunc
I'm glad that they implemented some basic library functions 10 years down the line.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#208And 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.
The second is instaparse, which I'd like to use to quickly test a TOML document against the TOML ABNF.
I couldn't get either to work. As in: I can't even get very simple examples to compile. The tooling is super confusing and weird. I appreciate that a lot of tooling you're not familiar with can be confusing and weird, but I managed to get to a lot of languages for my TOML test matrix to work, including many where I'm not familiar with. For some that took some time and patience, but that's okay. Clojure is the only one thus far where I just gave up (for now anyway).
So at least part of the answer to "why isn't it more popular" is "the tooling isn't very good". Maybe the tooling is "simple" by Hickey's definition of that, but it sure isn't "easy" by my definition, and in the end, "easy" does matter, especially for these kind of things.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#209I'm diving back into python after being mostly away for the better part of a decade having built high scale, highly available systems in Go during that time (including migrating several projects from python and perl to go). Being suddenly back in python is jarring. So much inheritance - abstract base classes and multiple inheritance via mixins, strange coupling in tests via over use of mocking and patching, and a rel…
I was thrust into a go project after a decade of python. The most jarring thing besides the 3rd party panics, was the idiom that nils are typed. This was different than python, java, JavaScript, c, c++, etc. Variable loop scoping is also weird. Writing unit tests is 10 times harder than python. Go statically links everything, and just that seems like going back 30 years in software development. Any security in a depe…
And while security problems are of course still a thing, there are a lot fewer of them than in C. Even in C it's not as bad as in "buffer overflow of the week" like in the 90s. It's that argument that's 30 years out of date.
Re: Python Is Easy. Go Is Simple. Simple != Easy
#210It's been a while but golang keeps making simple is better decisions that hurt the language and ecosystem.
Sure, saying just download a dep from git is simple, but it doesn't work. It makes the whole ecosystem fragile.
Sure putting all your deps in a global folder is simple but it means you have to have a tool to manage envs and swap them out anyway to be able to write more than one app.
Simple != Easy but neither of them equal good.