aboutsummaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
Diffstat (limited to 'TODO')
-rw-r--r--TODO51
1 files changed, 51 insertions, 0 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..9368f6f
--- /dev/null
+++ b/TODO
@@ -0,0 +1,51 @@
++ Some kind of "unreachable" might be nice to help the move checker? for
+instance,
+
+ if abc {
+ release(var);
+ fwdpanic("!!!");
+ }
+
+ use(var)
+
+might be nicer to write than
+
+ if abc {
+ release(var);
+ fwdpanic("!!!");
+ } else {
+ use(var);
+ }
+
+or the current alternative
+
+ guard(abc) => {
+ release(var);
+ fwdpanic("!!!");
+ } => ;
+
+ use (var);
+
+
++ Hmm, some kind of way to say 'this thing owns this reference' would be good.
+At the moment, I'm thinking something that parameter lists can be extended with
+ownership rules, so for example
+
+ at_vec(vec v, u64 i, (vec > &i64) ok)
+
+would return a 'new' vector and a reference into the vector. If the 'vec' is
+moved, the &i64 is marked invalidated, but the &i64 is allowed to be passed
+around as long as 'vec' is not moved.
+
+For more references, something like
+
+ hmm((owner > thing1 | thing2))
+
+is three parameters, thing1 and thing2 are both
+invalidated if owner is moved (getting two indexes from a vector to swap them?
+not sure). Not sure how complex this system should be, could there for example
+be a situation where
+
+ hmm((owner > thing1 > thing2))
+
+might make sense? For now, the parser only accepts the first form, (vec > &i64).