5 ms·
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
by ingoaf 3y ago
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.
- Cthulhu_ 3y agoThey may be geniuses, but some - mainly Ken Thompson - are also luddites, eschewing things like syntax highlighting. I mean they have a point - if you need colors to make your code readable, your code isn't readable. But yeah, I love how everything is well thought out and they just say "no" a lot.
- infecto 3y agoThis was one of the troubles I always had with Java. It was very hard for me to reason about with some of the wildly nested inheritance.
- coffeebeqn 3y agoI 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
- kyrra 3y agoIt depends on what libraries you use and how you structure your code. Yes, you can create inheritance hell within Java code. But you can also use composition (what Go uses) within Java and create sane code bases. Inheritance is a foot gun that got overused in the '90s and early 2000s. But people have learned mostly to avoid it unless really needed.
- zimpenfish 3y ago> 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 single HTTP handler actually does.
- baby 3y agoI’ve seen one Golang codebase like this and it was made by Java people
- mrweasel 3y agoA certain number of developers will be able to complicate any language or mechanism you provide them, it's how they feel important. I've notice the there is a group of people who has their entire identity tied up in being "smarter" than everyone else, except they aren't, so they build extremely complex systems, because they think that's what smart people do. They are interestingly often extremely well versed in their tool of choice.
- munificent 3y ago> I've notice the there is a group of people who has their entire identity tied up in being "smarter" than everyone else I've also seen the opposite where people revolve their entire identity around not being the person and they swing too far the other direction and end up being a masochist and doing things the dumb way because they're too afraid of coming across like a snob.
- ingoaf 3y agoThis is actually a real gem of a comment. Thank you for that!
- mostlylurks 3y agoYou are mistaken if you think that the abundant use of interfaces etc. is motivated by anything along those lines. As someone who often puts basically everything behind an interface and abstracts everything in sight, it's not because it has anything to do with being smart, quite the opposite; it's the only way I can keep any meaningful portion of the code in my head. Give me a 5000-line straightforward / unabstracted implementation of something and I'll struggle, but give me thingDoer.doThing(), behind an interface so I don't even have to know how to construct one, and I'll be happy and able to focus on the task at hand. This applies even if I'm the one who wrote the ThingDoer interface and its implementation(s), and even if it was only 30 minutes ago.
- Thrymr 3y ago> 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.
- EnergyAmy 3y ago> 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.
- lambda_garden 3y agoIronically, we had more advanced languages than Go in the 70s.
- Ferret7446 3y agoAdvanced != good. It takes some genius to realize that.
- Cthulhu_ 3y agoYeah, but advanced languages are also a problem for long-term maintainability. Remember, Go was developed at Google - jokingly, while waiting for stuff to compile. They deal with tens of millions of lines of C++ written by thousands of engineers with varying skill levels and career paths. The advancedness of C++ did not reduce the compile times or readability of the code. At those scales you can't rely on being familiar with a particular section of code; you need to be able to drop in anywhere and know what's going on, without having to learn which subset of the advanced language they used for that particular feature. Go is not advanced by design.
- lambda_garden 3y agoAdvanced languages can compile quickly - it depends on the feature set chosen. For example, do-notation is an advanced feature not found in most languages, but it compiles quickly as it is syntactic sugar. Operator overload, on the other hand, might require a solver and thus compile slower. It's not a particularly advanced feature, however. Binary optimization passes do not make the language any more advanced (on the user side), but will slow down compilation. Advanced design and compile-times are pretty orthogonal. As for maintainability, it's not clear to me that reams of imperative code is easier to maintain than something terse and declarative. In fact, probably the opposite.
- fh973 3y agoYou can write 90s object oriented code in any language.
- geraneum 3y agoGo was first and foremost created to serve the needs of Google. Kudos to them for releasing, open sourcing and backing it but it was designed to serve their needs. It’s not a criticism but it explains why it’s quirky in many areas. The authors being genius is not as important as the goals and intentions.
- pron 3y agoTo know which interfaces a Go type implements (and so where it can be used) requires reading more, not fewer files than in Java.