Plurrrr

Mon 17 Apr 2023

What is a Go function variable?

In Go as it is presently…

  1. Function variables are pointers
  2. They point to small structs
  3. Those structs contain either
    1. just the pointer to the function code for simple functions
    2. or to pointers to autogenerated wrapper functions and receivers &/or function parameters in the case of method calls and closures.

And why can’t you compare them? I expect it was just too hard to agree to a convention about which pointers would be considered equal when there are closures and method calls and function wrappers around.

Source: What is a Go function variable?, an article by Phil Pearl.

Everything you never knew about NATs and wish you hadn't asked

The Internet is a mess, and one of the biggest parts of that mess is Network Address Translation (NAT), a technique which allows multiple devices to share the same network address. In this series of posts, we'll be looking at NATs and NAT traversal. This post is on NATs and the next one will be on NAT traversal techniques.

Source: Everything you never knew about NATs and wish you hadn't asked, an article by Eric Rescorla.