26 ms·
I’m simply not convinced about that talking point. It’s an extraordinarily strong claim that it’s comprehensible to everyone. Sure if you have a 100 lines of p
by kubb 5y ago
I’m simply not convinced about that talking point. It’s an extraordinarily strong claim that it’s comprehensible to everyone.
Sure if you have a 100 lines of pure Go, that should be readable. But take a look for instance at the source for go tool cover. How much time do you need to spend to understand it? Then imagine Rob didn’t write it, but a junior. How much more convoluted would it be?
- FreezerburnV 5y agoYou’re conflating ease of understanding/reading Go code with complexity of a hard problem. I can personally read the standard library, or basically any library, and I regularly do to understand how stuff works under the hood. But certain problems are hard and are going to take time to understand the problem and solution versus a basic idea of some things the code is doing. Eg: reading how a RabbitMQ library is using a parameter versus understanding the entire protocol it’s handling. Go is very nice in being able to read other people’s code where other languages it’s extremely hard. (Eg: I’ve tried to read the code for SQL Alchemy in Python and it’s… very hard)
- Karrot_Kream 5y agoI'm as torn as some of the other commenters here as Go can feel stifling to me frequently, but I have to say I find Go's readability comes with a culture of reading the source, which can be powerful. Often if I'm using a Go tool and I have questions about exactly what it's doing under the hood, unlike other languages where I have to learn the localized style/conventions/patterns (are you using annotations? Dependency Injection? Thread pools or async?), I can just pop open the source and read it. That doesn't necessarily mean I'll _understand_ what I'm reading easily but it does let me pick up subtleties under the hood. Hashicorp's tools are great examples; before you could find endless posts online about using their tools I'd often dive into portions of Consul or Nomad with questions. Both of these are complicated pieces of software and being able to read the source helped a lot. On the other hand, trying to debug Werkzeug and Flask in Python is a nightmare of objects inheriting weird properties and all sorts of control flow weirdness, despite Flask ostensibly being a lightweight web framework.