From 44ca4bbc4bb7cadf041e3ee727516d46772ce81a Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Wed, 28 May 2025 09:45:35 +0200 Subject: [PATCH] update roadmap --- progress.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/progress.txt b/progress.txt index 96d955d..14327c2 100644 --- a/progress.txt +++ b/progress.txt @@ -15,6 +15,25 @@ done: todo: - simpler encoding of product/sum and struct/enum + want: + - easy to debug (current solution of deeply nesting sums/products results in hard-to-read values) + - not crazy inefficient (current solution requires N 'jumps' for the N-th field) + - bonus: should "mix well" with React so the React state can be typed by DOPE. + array-based: + struct {x:42, y:true, z:"hey"} becomes [42, true, "hey"] + enum {kind: "product", val: {price: 100}} becomes ["product", 100] + assessment: + (+) we don't need the keys in our encoding (they are redundant if we know the type) + (-) lack of keys is slightly harder to debug + (--) very big objects (e.g., our web application state) become a single array, which is very inefficient to update (no reuse) + => OFF THE TABLE + slight variation: + - still use arrays for structs + - natively support N-ary product/sum + -> easy to implement + -> easy to debug + - no flattening + - mutually recursive types @@ -33,4 +52,3 @@ todo: (b) dirty: use 'magic' function that compares any JS value - interfaces (type classes) -