Typed nils in Go 2
This is an experience report about a gotcha in Go that catches every Go programmer at least once. The following program is extracted from a larger version that caused my co-workers to lose several hours today.
Here’s a small quiz derived from some incorrect advice from an AI coding assistant.
Visit dave.cheney.net → RSS feedOn Hacker News Sep 2012 – Jun 2020
Software Engineering 25Programming Languages 25Systems & Performance 9Career & Management 6History & Retro Computing 2Society, Policy & Culture 1
This is an experience report about a gotcha in Go that catches every Go programmer at least once. The following program is extracted from a larger version that caused my co-workers to lose several hours today.
In October this year I had the privilege of speaking at the GothamGo conference in New York City. As I talk quite softly, and there were a few problems with the recording, I decided to write up my slide notes and present them here.
What follows is the text of my presentation, Functional options for friendly APIs that I gave at dotGo this year. It has been edited slightly for readability.
Some people, when confronted with a problem, think “I know, I’ll use cgo.” Now they have two problems.