update roadmap

This commit is contained in:
Joeri Exelmans 2025-05-28 09:45:35 +02:00
parent bc9a229a5c
commit 44ca4bbc4b

View file

@ -15,6 +15,25 @@ done:
todo: todo:
- simpler encoding of product/sum and struct/enum - 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 - mutually recursive types
@ -33,4 +52,3 @@ todo:
(b) dirty: use 'magic' function that compares any JS value (b) dirty: use 'magic' function that compares any JS value
- interfaces (type classes) - interfaces (type classes)