๐ŸŒฒ u/greg

๐ŸŒ’ Subspaces

๐Ÿ“– Help

โค๏ธ Code of conduct

Sign up

Posts

๐ŸŒฒ greg

No, you can't build Optional[T] or Maybe[T] with Go โ€” From time to time, someone shows up on Mastodon, in /r/golang, or on the Gophers Slack to show how they implemented optional values like you see in Haskell, OCaml, TypeScript, or Rust in Go. All of these approaches have one thing in common: they're not really Optional[T] or Maybe[T]. They look like it on the surface: there are generics involved, they may have a "is this valid?" boolean flag field, the name is right, etc... What all of...

๐Ÿ’ฌ 4 comments ยท 3 likes ยท 2024-10-22 ยท 2 years ago ยท #go

Options

๐Ÿ—ฃ๏ธ Sort by activity

๐Ÿ”ฅ Sort by hotness

Gemini feed

Atom feed

Tinylog