{"articles":[{"slug":"union-vs-sum-types","title":"Union vs sum types","subtitle":null,"summary":"A clear comparison of union types and sum types: how they overlap, where their subtle differences change API design and safety, and when each model fits better in modern languages.","content_type":"essay","language":"en","canonical_url":"https://viralinstruction.com/posts/uniontypes/","author":{"name":"Viral Instruction","url":"https://viralinstruction.com/","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Viral Instruction","url":"https://viralinstruction.com/","listing_slug":null,"listing":null},"topics":[{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"Type Systems","slug":"type-systems","url":"https://listedarticles.com/topics/type-systems"},{"name":"Software","slug":"software","url":"https://listedarticles.com/topics/software"},{"name":"Engineering","slug":"engineering","url":"https://listedarticles.com/topics/engineering"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1967,"reading_minutes":9,"published_at":"2021-10-06T00:00:00.000Z","added_at":"2026-09-20T09:07:51.994Z","updated_at":"2026-09-20T09:07:51.994Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/union-vs-sum-types","markdown_url":"https://listedarticles.com/articles/union-vs-sum-types.md","example":false,"citation":"Viral Instruction, Viral Instruction. \"Union vs sum types.\" 6 Oct 2021. https://viralinstruction.com/posts/uniontypes/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://viralinstruction.com/posts/uniontypes/"},"snippet":null,"score":null}],"total":1,"count":1,"next_offset":null,"has_more":false,"query":{"q":null,"content_type":"essay","topic":"type-systems","publisher":null,"about":null,"author":null,"language":null,"sort":"newest","limit":20,"offset":0}}