TODO 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. TODO
  2. ## Important
  3. refactor (getFoo, unboxBar, obtainIsoBaz) after generics available
  4. function entity serialize (compiled bytecode)
  5. ## Refinement
  6. - GUI: full-featured normalize-css, increase font size of examples
  7. - GUI: disable page zoom (enabled by default in QtWebEngine)
  8. - Main: ansi palette selection by command line args
  9. - Code: dummy interface: consider { impl(Interface) } instead of { Interface() }
  10. - Lang: only const auto call with unit
  11. - Runtime: const early evaluation (-> native func()(Value) returns saved value)
  12. - Runtime: native function -> cps form
  13. - Lang: string interpolation by implicit context "#{i} * #{j} = #{k}"
  14. - Lang: CPS: unit-input lambda instead of (a,k) // e.g. considering assert()
  15. - Rx:
  16. Async: (() => T) => Async[T]
  17. bind: Sync => K // sync
  18. bind: Async => ... // then (await)
  19. zip: (Computed[A], Computed[B]) => Computed[(A,B)] // combine
  20. zip: List[Computed[T]] => Computed[List[T]] // combine-latest
  21. map: ((Computed[A], Computed[B]), (A,B) => T) => Computed[T]
  22. sample: (Source[A], Computed[B]) => Source[(A,B)] // with-latest-from
  23. sample: (Source[A], (Computed[B], (A,B) => T)) => Source[T]
  24. // compute & sample: <= 1 update / 1 tick
  25. reduce -> fold
  26. type Bus[T] protected {
  27. in: Sink[T],
  28. out: Source[T]
  29. }
  30. // Reactive
  31. type Cell[T] protected {
  32. in: Sink[T],
  33. out: Computed[T]
  34. }
  35. // type Cell (RecordValue);
  36. // (in,out,rx.Reactive)
  37. \ buf := go { Reactive '' },
  38. - FlexList: consider refactor using balanced tree + inline index
  39. - Code: AST node renaming
  40. - GUI: qtbinding C side int vs. go side int (not the same type, fix it)
  41. - API: consider "NOT" instead of "not"
  42. - API: consider renaming wait and tick
  43. - GUI: setAttributeNS() for SVG elements
  44. - Lang: REST API interface
  45. - Compiler: revise FuncInfo.SourceMap (try to reduce space usage)
  46. ## Type System Refactor
  47. - Lang: only function can have bounds (type def cannot)
  48. - Lang: consider { instance.method arg }, type A (I1, I2) { ... };
  49. (syntax obj.method also apply to concrete type
  50. (report ambiguous when both field and method accessible))
  51. - Lang: consider curried function as method: &(Instance) => &(In) => Out
  52. - Lang: consider curried input as implicit input: &(Ord[T]) => &(T,T) => Bool
  53. type I (Base1,Base2) interface { method: &(A) => B }
  54. type Op= [T] &(T,T) => Bool;
  55. type Op< [T] &(T,T) => Bool;
  56. export function > :
  57. [T] { <: Op<[T] }
  58. &(T, T) => Bool
  59. &(a, b) => (b < a);
  60. |None|
  61. |Some| 1 : Maybe[Integer]
  62. |exact:Some| 1 : Some[Integer]
  63. |Success| 1
  64. { |Point| (x, y) }
  65. | .&x |
  66. ||
  67. // formatter: input should be a tuple of interfaces (String: String)
  68. { "x=?, y=?" (x,y) }
  69. \ x := await foo,
  70. bar
  71. type type[T] protected Type;
  72. type Type native;
  73. type value[T] protected Value;
  74. type Value native;
  75. |reflect::type[Foo]|
  76. |reflect::value| "abc"
  77. // type assertion etc. implemented by (native) functions
  78. - Lang: type check: (expected, ast-node, inferred) => Result[(expr, new-inferred)]
  79. - Lang: bounds should only allow certain types (cannot include parameters)
  80. - Lang: type/function alias Name = ref (just a name resolution interceptor)
  81. - Lang: permit anonymous record expression (currently requires explicit type)
  82. - Lang: fix the order randomness of field assignment of anonymous record input
  83. - Lang: bidirectional type inference
  84. - Lang: revise overloading rule (consider introducing input-based precedence)
  85. ## API Refactor
  86. - API: categorize API functions according to usage, corresponding types, ...
  87. - API: better native function names
  88. - API: separate string APIs from `api/container.go` and `lib/container/string.go`
  89. - API: to be semantic: tuple input --> record input
  90. - API: revise Reactive[FlexList[T]] methods, consider methods for Reactive[Map[K,V]]
  91. - API: revise resource management of files, ... (consider Disposable[T] monad)
  92. ## GUI Enhancement
  93. - API: type Provider[T,A] (Computed[T], Sink[A]);
  94. - GUI: crash report window
  95. - GUI: support: menu, toolbar, popupmenu, modal dialog