News for hackers. Stuff that matters.
Re:Decoding JSON sum types in Go without panicking by tshaddox on Wednesday March 19, 2025 @07:07PM (#43418180)
This is pretty much the exact opposite of how I see the world with regards to data modeling. I suppose I'm a sum type radicalist. There are few non-trivial things in the world that I would model without heavy use of sum types.
Re:Decoding JSON sum types in Go without panicking by bnpxft on Thursday March 20, 2025 @10:44AM (#43424189)
Yes exactly. The real world is full of examples of a fixed set of exclusive options.

A programming language without sum types and exhaustive pattern matching in its type system is unable model this real world concept in its type system.