How And When To Use Pointers in Go

Written by wagslane | Published 2020/09/25
Tech Story Tags: golang | programming | tutorial | go | pointers | dereference | software-development | memory-management

TLDR A pointer is a variable that stores the address of a value, rather than the value itself. Pointers can be useful, but in the same way that they are useful, they can be dangerous. When you dereference a pointer that has no value, the program will panic. There are some rules of how and when to use pointers in Go. Go is wanted for its simplicity, explicitness, speed, and low memory consumption. It has been consistently displacing other backend languages like Ruby, Python, C# and Java.via the TL;DR App

no story

Written by wagslane | Founder of Boot.dev. Whining about coding sins since 2011. Committing coding sins for the same.
Published by HackerNoon on 2020/09/25