💾 Archived View for bbs.geminispace.org › u › gritty › 22120 captured on 2024-12-17 at 15:49:52. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Comment by 🍀 gritty

Re: "Go - can someone explain why empty interfaces can hold any..."

In: s/programming

I guess that makes sense. I first saw this when reading about using an interface as a value in a map for json.

🍀 gritty [OP]

Nov 23 · 3 weeks ago

Original Post

🌒 s/programming

Go - can someone explain why empty interfaces can hold any value, where it seems "regular" interfaces only define functions? In other words, why can the empty interface hold something other than a function definition? new to Go and interfaces in general...

💬 gritty · 2 comments · Nov 23 · 3 weeks ago