Comment by ๐Ÿš€ mk270

=> Re: "No, you can't build Optional[T] or Maybe[T] with Go" | In: u/greg

It is adorable that the misunderstandings of statically type-checking sometimes uttered by proponents of dynamically type-checked languages can be reproduced in statically type-checked languages like Go.

=> ๐Ÿš€ mk270

2024-10-25 ยท 3 months ago

Original Post

=> ๐ŸŒฒ 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 ยท 3 months ago ยท #go

Proxy Information
Original URL
gemini://bbs.geminispace.org/u/mk270/21221
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
41.898323 milliseconds
Gemini-to-HTML Time
0.584726 milliseconds

This content has been proxied by September (3851b).