3 ms·
That’s not true. Here is a go playground of pretty much that exact code running just fine https://go.dev/play/p/v7OM9s_pRqY https://go.dev/play/p/v7OM9s_pRqY
by koeng 2y ago
That’s not true. Here is a go playground of pretty much that exact code running just fine
https://go.dev/play/p/v7OM9s_pRqY https://go.dev/play/p/v7OM9s_pRqY
- deathanatos 2y agoSteelman their example. Given that they named the member "MaybeHasCat", it's pretty clearly meant to analogue an Option<Cat>; if you correct the small typo then (make the type of "MaybeHasCat" a pointer, so that it can store nil for the other half of the Maybe), the example behaves exactly as they describe.
- iknowstuff 2y agoWtf? what are you doing? Did the point fly over your head, are you being malicious by removing the star, or?
- koeng 2y agoThey added the star as an edit because of my playground link. So, neither