Pointers in Go

Jack Fowler
1 min readFeb 5, 2021

Pointers are often over-hyped in terms of there difficulty, which scares people from learning them in the first place and hinders learning.

In order to really understand what is going you need to fiddle with Code and draw a chunk of RAM in your notebook to unveil the truth.

Let’s look at simple example. Read through the comments and even make your own example on the Tour of GO playground.

How can we use Pointers in real life? Pointers can allow engineers to work with specific locations in memory if they are concerned with memory location and memory management. They add another level of customization so that you can take more control over your software. Whenever you create a new variable you need to reserve that location in the Memory, which can allow developers to be more conservative about their memory usage.

Resources

--

--