From 25911d7c9d70703ed9633cdb1fb1da0dcec0fab2 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 20:31:57 +0700 Subject: [PATCH 1/2] Nested ML-style patterns are wanted --- TODO.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO.org b/TODO.org index 262eec92..cee24e7a 100644 --- a/TODO.org +++ b/TODO.org @@ -296,6 +296,10 @@ keyword resolves against the expected type and against nothing else, so two enum could always share a member spelling. What the prefix buys is the call site read on its own. +** TODO ML-style patterns +Wanted: nested destructuring (data cases, structs, arrays, slices), guards, or-patterns, +literals at any depth, and exhaustiveness checked over the nesting. Needs a design pass. + ** NEXT match over numbers and strings Decided 2026-09-25: a match arm's pattern can be an integer, a float, a char or a string literal, compared as =(= t lit)=; a match over such a type needs a =_= arm. From db7f703c0e4fdeeb6f1e16f11cd838eca276ea65 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 20:33:26 +0700 Subject: [PATCH 2/2] ML-style patterns are held as a future direction --- TODO.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TODO.org b/TODO.org index cee24e7a..45c6a7bc 100644 --- a/TODO.org +++ b/TODO.org @@ -296,9 +296,9 @@ keyword resolves against the expected type and against nothing else, so two enum could always share a member spelling. What the prefix buys is the call site read on its own. -** TODO ML-style patterns -Wanted: nested destructuring (data cases, structs, arrays, slices), guards, or-patterns, -literals at any depth, and exhaustiveness checked over the nesting. Needs a design pass. +** WAIT ML-style patterns +Held 2026-09-25 as a future direction, like the JS backend: nested destructuring, +guards, or-patterns, literals at any depth, exhaustiveness over the nesting. ** NEXT match over numbers and strings Decided 2026-09-25: a match arm's pattern can be an integer, a float, a char or a