Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
10 things you (probably) didn't know about Go (2012) (wh3rd.net)
16 points by kator on April 20, 2014 | hide | past | favorite | 10 comments


Not sure how this got linked. The talk is not hosted there anymore (and hasn't been for some time). Here's its actual location:

http://talks.golang.org/2012/10things.slide#1


The submitted link works for me.


It sometimes worked for me. The server's likely overwhelmed. The Coral Cache link works consistently:

http://nf.wh3rd.net.nyud.net/10things/#1


It's not overwhelmed. There must be a bug in my web server!


It only worked for me after 5 failures.


Seems it's a load balancing issue. It does load after hitting refresh multiple times.


Link returned a 404.


Nested structs are really neat. I'm working on a project where I'm querying dozens of external API services, and I had to create a separate type structs for each JSON object just to get the interesting info nested in the response.

I wonder why he's using a chan struct{} for the quit channel. Is there a reason for that? Is it more efficient?

Usually I use a boolean for that:

    quit := make(chan bool)
    <some code>
    quit <- true


I believe the empty struct is marginally smaller than a boolean.


I've seen this used to ensure the semantic of the operation. It hasn't add any value to pass true or false to the quit channel right?




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

Search: