Personally this syntax looks the best while also making a distinction between sum types and typical enums, _however_ , when it comes to pattern matching, I believe a separate `match` keyword would look nicer. # Assuming `some` is implemented with sum types in this example let strOpt = some("Foo") let strTupleOpt = some(("Bar", "Baz")) match strOpt of Some as foo: echo foo of None: discard match strTupleOpt of Some as (bar, baz): echo bar, ", ", baz of None: discard Run
- Sum types, 2024 variant Araq
- Sum types, 2024 variant bajith
- Sum types, 2024 variant Araq
- Sum types, 2024 variant bajith
- Sum types, 2024 variant bajith
- Sum types, 2024 variant TKD
- Sum types, 2024 variant walkr
- Sum types, 2024 variant ingo
- Sum types, 2024 variant Nerve
- Sum types, 2024 variant hamidrb80
- Sum types, 2024 variant Chronos
- Sum types, 2024 variant crfout
- Sum types, 2024 variant xigoi
- Sum types, 2024 variant Araq
- Sum types, 2024 variant didlybom
- Sum types, 2024 variant Araq
- Sum types, 2024 variant Araq
- Sum types, 2024 variant ElegantBeef
- Sum types, 2024 variant Araq
- Sum types, 2024 variant walkr
- Sum types, 2024 variant Araq