4 ms·
And it's fine. Why continue using something you don't master? Yes you could try to master it, but it takes years. If another tool compensates your lack of mast
by linkdd 2y ago
And it's fine. Why continue using something you don't master?
Yes you could try to master it, but it takes years. If another tool compensates your lack of mastery, why not use it?
- WJW 2y agoTo me the implication is that the culture at this company won't allow this team to master Go either, and in a few years there will be a post describing how they moved from Go to another language. Many people like to write about how Golang is so simple, but the drawback of that simplicity is that many features of other languages are either covered by additional dependencies or by inflating code size. It's just as possible for Go projects to devolve into big balls of mud as for any other language.
- btreecat 2y agoThis is why I don't buy the FP hype
- ReflectedImage 2y agoGolang's standard library looks pretty complete to me and they will probably master it in a month.
- WJW 2y agoThe mindset that you can master any programming language in a month is exactly what I meant in my previous post. There's a veritable cottage industry of "golang pitfalls" blog posts out there that show there are absolutely a lot of footguns in Go. For example, what do you think the following should print? values := []int{4, 8, 15, 16, 23, 42} for value := range values { fmt.Println(value) } I don't think there are very many people who would guess the integers 0 to 5. I also like the following one: ch := make(chan int) ch <- 1 fmt.Println(<-ch) What would this print? The only correct answer is sadly "fatal error: all goroutines are asleep - deadlock!". Golang is a fine language and simpler than most, but sadly "simpler" is not the same as "simple".
- mike_hearn 2y agoBut people here are comparing a language standard library with a framework like Spring, which doesn't make sense. The Java standard library has a web server in it, it has JDBC. You could use those directly. That's comparable to the Go standard library. For real apps people don't do this because they want a lot more, like simplified database access or session management. Look at this: https://pkg.go.dev/database/sql https://pkg.go.dev/database/sql It strongly resembles JDBC. Doing a database query with that is verbose and error prone. Compare the work needed to do a lookup query and map the results to a data structure with that to (Micronaut syntax, Spring is similar): @JdbcRepository(dialect = Dialect.POSTGRES) interface GophersRepository extends CrudRepository<Gopher, String> {} ... and later ... var someGopher = gophersRepository.findById("goo"); Add the username/password/host/port to the config file and that's all you need for db access. Compare to the Go stdlib which wants you to manage drivers, connections, prepared statements, rollbacks, etc. It's a different level of abstraction.
- pjmlp 2y agoAnd it misses something like Swing, which while not perfect, does the job and the best Go can hope for is Fyne, as third party. Multithreaded collection types. Configuring scheduling algorithms. Pluggable services, cryptography algorithms, filesystem. Sane way to manage dates, granted the original one was a bit clunky, but way better than parsing strings. Sometimes I wonder if folks that criticise Java, and .NET, actually spend any time learning their standard libraries in practice.
- nprateem 2y agoBecause like any shortsighted decision it can come back to bite you later.
- lenkite 2y agoThere are a lot of leanings to master for Go as well which they may have not discovered. As an example, the Go runtime does not honor container resource limits. You would think this would be one of the very first fundamental features supported out of the box by an advertised "cloud native" language.
- demi56 2y ago> As an example, the Go runtime does not honor container resource limits That’s no longer true for Go 1.19+
- lenkite 2y agoAFAIK, the basic issue is still open at https://github.com/golang/go/issues/33803 https://github.com/golang/go/issues/33803 and https://github.com/golang/go/issues/59715 https://github.com/golang/go/issues/59715. You still need to use a helper library like https://github.com/KimMachineGun/automemlimit https://github.com/KimMachineGun/automemlimit or https://github.com/uber-go/automaxprocs https://github.com/uber-go/automaxprocs. Go 1.19 only had this in its notes for memory changes "...includes support for a soft memory limit. This memory limit includes the Go heap and all other memory managed by the runtime, and excludes external memory sources such as mappings of the binary itself, memory managed in other languages, and memory held by the operating system on behalf of the Go program" Forgot to add: The JVM does this for you since JDK 17 https://developers.redhat.com/articles/2022/04/19/java-17-whats-new-openjdks-container-awareness https://developers.redhat.com/articles/2022/04/19/java-17-wh...