Earlier quoted context omitted.
Problems are generic, such as having a tree collection. For solving generic problems, you can either use language generics, or reflection, or type erasure, or codegen. The latter three are about as far from 'boring and clear' as you can get. Still verbose, though, but I don't expect that's a benefit.
I would say 95% of people who are trying to solve a complicated problem with reflection, type erasure, or codegen are solving the problem the wrong way. Obviously I'm glad these tools exist, and some problems can indeed only be solved with them. But I think people reach for them as a first solution and make bad code as a result. Go strongly encourages you not to reach for bad solutions, which is one of its bigger adv…
Ten years of “Go: The good, the bad, and the meh”
91–100 of 305 posts
Re: Ten years of “Go: The good, the bad, and the meh”
#92Earlier quoted context omitted.
> anyone who knew anything about programming languages rolled their eyes at pretty much everything about Go's type system And Go has succeeded despite these condescending diatribes on how a language needs to have a Hindley-Milner type system with ADTs and type classes to be useful. Go made me truly realize how insufferable the PLT community is, and why they are so absolutely lost when it comes to creating successful…
Go really is great. There was a big argument around a new project we were starting whether to do Go or Clojure. What we did to settle the debate was to ask an entry level dev that was just starting if he was interesting in writing two sample applications in each language, having known nothing of either. Nothing complicated but touched enough points (HTTP endpoints, database interaction) A full day later was still try…
Python would beat anything by this measure, but static typing is amazing for stopping bugs.
Re: Ten years of “Go: The good, the bad, and the meh”
#93I am immensely thankful for Go. The simplicity of the language and the stdlib is shockingly well thought out -- things like io.Reader are so obvious and yet not part of many other languages. The language has made me a better programmer. And the cross-compilation story is chefs kiss . Working on a cross-platform project where in Go, I write code and it just builds. In Java, I fight with Gradle. In Swift, I fight the t…
Re: Ten years of “Go: The good, the bad, and the meh”
#94Earlier quoted context omitted.
I would say 95% of people who are trying to solve a complicated problem with reflection, type erasure, or codegen are solving the problem the wrong way. Obviously I'm glad these tools exist, and some problems can indeed only be solved with them. But I think people reach for them as a first solution and make bad code as a result. Go strongly encourages you not to reach for bad solutions, which is one of its bigger adv…
Collections obviously need to be generic though. Slices and maps were generic from day 1 in go so it's not like this is controversial.
Re: Ten years of “Go: The good, the bad, and the meh”
#95Earlier quoted context omitted.
default values for everything without significantly increasing language complexity
As far as I'm concerned, that's a drawback. Ubiquitous default values are an attractive nuisance. One which C# had already demonstrated 10 years prior. The removal of nil leading to the removal of ubiquitous default values would have been positive.
Re: Ten years of “Go: The good, the bad, and the meh”
#96Go: amazing tooling/libs, only needs a great language :-)
But a few tweaks, like proper Enums and a Option/Return Type (to avoid excessive err != nil), maybe a compilerflag to force dealing with errors (instead of _ it) - much better. If I can wish for something, then some native map/filter/reduce to avoid excessive for-loops…? :-)
Re: Ten years of “Go: The good, the bad, and the meh”
#97I am immensely thankful for Go. The simplicity of the language and the stdlib is shockingly well thought out -- things like io.Reader are so obvious and yet not part of many other languages. The language has made me a better programmer. And the cross-compilation story is chefs kiss . Working on a cross-platform project where in Go, I write code and it just builds. In Java, I fight with Gradle. In Swift, I fight the t…
> Working on a cross-platform project where in Go, I write code and it just builds I've worked on large golang code bases that had to build on bazel, and I had the same experience fighting it. It has nothing to do with the language. > In Java, I fight with Gradle. So gradle's issue, not Java's. See above.
That is absolutely not the case with C, C++, Java, python.
> So gradle's issue, not Java's. See above.
The issue exists with maven too, but _not_ with go build, which is OP's point.
Re: Ten years of “Go: The good, the bad, and the meh”
#98Great article. Go may have generics, but because old Go code doesn't, and the standard library doesn't, it still feels like the language doesn't sometimes.
Basically learning the lessons of Java and C# all over again. Yes, there are features you can defer implementing until later, but their absence infects everything until you do. I still see cases where people have to drop down into ADO.Net code for C#, and the fact that you still see DBNull.Value instead of just a simple null value, much less a proper Option type is infuriating. Like I write a lot of Powershell code a…
This DBNull.Value may be a problem for C#, but idiomatic Go has largely been untouched by the introduction of generics.
Re: Ten years of “Go: The good, the bad, and the meh”
#99Its a shame that Go as a language is so lacking, the tooling is amazing. I wish there was something like Go but with an actually good programming language attached.
Re: Ten years of “Go: The good, the bad, and the meh”
#100Earlier quoted context omitted.
Collections obviously need to be generic though. Slices and maps were generic from day 1 in go so it's not like this is controversial.
For sure — a lot of language features need to be generic. But most people aren’t coding language features, and giving them the ability to do so can lead to, well, CodeFactoryFactoryMakerGenericMethodHelpersFactory, rather than good, clear, usable code.
> But most people aren’t coding language features
It's definitely a tough lever, but supporting generics for the people who are means that the people who aren't can write cleaner code. I think go got it right, eventually.