πŸ‘€mkl95πŸ•‘4yπŸ”Ό311πŸ—¨οΈ166

(Replying to PARENT post)

Go has warts and 101 faults (depending who you are and how hard you squint)...

But what I absolutely love about Go is how easy(relative to other languages) it is to 'read' most of the Go code in the wild, including the std libs !

YMMV...

Every tried reading C++ libs/header-libs ?

πŸ‘€rawoke083600πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I want to see an β€œEffective Go” about unit testing functions that call other functions, without devolving into meaningless mocking and error propagation boilerplate.
πŸ‘€closeparenπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

This doc goes over pages of conventions, patterns, design advice, tips, explanations, etc. without once using the idiom "best practice". It is balanced and sometimes mention that advice can be taken too far.

I salute you for that!

πŸ‘€charles_fπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I always refer myself and junior developers to Effective Go to sharpen their skills when working in our codebase.

Are there other hidden Go gems/guides that exist that I happen to not know about as well?

πŸ‘€kgravesπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

A bunch of other docs I've looked up number of times and found handy:

- Slice tricks: https://github.com/golang/go/wiki/SliceTricks

- Rest of the Golang Github Wiki: https://github.com/golang/go/wiki#additional-go-programming-...

- Spec - very approachable: https://golang.org/ref/spec

- Standard library source code - clean code with lots of idioms to learn from: https://cs.opensource.google/go/go/+/refs/tags/go1.17.1:src/

πŸ‘€oxplotπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Shameless plug on my opinionated [Go Styleguide](https://github.com/bahlo/go-styleguide) – let me know what you think!
πŸ‘€abahloπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

Not a Go programmer but Dart also has something like this for a while which has been a pleasure to use, glad to see others can get the same benefits now.

https://dart.dev/guides/language/effective-dart

πŸ‘€mhoadπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

> Go is a new language

It’s been 12 years next month. Might be time to change that?

πŸ‘€awbπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

> Why is there no pointer arithmetic?

Safety. Without pointer arithmetic it's possible to create a language that can never derive an illegal address that succeeds incorrectly. Compiler and hardware technology have advanced to the point where a loop using array indices can be as efficient as a loop using pointer arithmetic. Also, the lack of pointer arithmetic can simplify the implementation of the garbage collector.

<3

πŸ‘€creckerπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

I really liked using Go until I tried to publish a module with a version greater than 1.

What kind of packaging system chokes on v2 of a module? What kind of language recommends[0] with a straight face that you just duplicate your entire codebase into a v2/ subdirectory?

The module system is so obtuse and the documentation so poor that I will probably avoid go and choose other languages from now on. It really feels like they came to release time and someone in the meeting said "hey guys what if someone wants to release a new major version of their library?" and everyone else in the room had an "oh shit" moment because their amateur language design didn't address that corner case.

[0] https://go.dev/blog/v2-go-modules

πŸ‘€na85πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

So why did we need go when Java already existed?
πŸ‘€google234123πŸ•‘4yπŸ”Ό0πŸ—¨οΈ0

(Replying to PARENT post)

When I look at a language I could not care less about the selection of keywords, the syntax used for a loop or the naming conventions. What I look for are the means of abstraction that the language provides, and Go gives nothing more than C.
πŸ‘€ihusasmiiuπŸ•‘4yπŸ”Ό0πŸ—¨οΈ0