Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The 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".



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: