003: Pointers or !Pointers, stack, and heap episode artwork

EPISODE · Feb 3, 2022 · 17 MIN

003: Pointers or !Pointers, stack, and heap

from go podcast() · host Dominic St-Pierre

We go over what are pointers and when to use or not use them. For instance, this is probably not a good use for pointers.func main() {  var i int = 10  abc(&i)}func abc(i *int) {  *i = 15}In my opinion any dereferencing is probably bad. Better way:func main() {  var i int = 10  i = abc(i)}func abc(i int) int {  return 15}I also try to give some basics info regarding the stack and heap and why pointers might not be seen as an optimization.I have a course on building SaaS in Go.Follow me on Twitter.

Episode metadata supplied by the publisher feed · Published Feb 3, 2022

Embed this episode

What are pointers. When not to use pointers and are pointers an optimization vs. using variables.

Distinct summary based on available episode metadata or transcript content.

Ready to play

003: Pointers or !Pointers, stack, and heap

0:00 17:10

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of go podcast()?

This episode is 17 minutes long.

When was this go podcast() episode published?

This episode was published on February 3, 2022.

Can I download this go podcast() episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!