]> ocean-lang.org Git - ocean-D/blobdiff - 00-TODO
updates
[ocean-D] / 00-TODO
diff --git a/00-TODO b/00-TODO
index 07109022d2e0f211d313d8b316beede85e7c32db..e3ef707a62c062fde45f61cf416f85b5e13c9c52 100644 (file)
--- a/00-TODO
+++ b/00-TODO
@@ -2,33 +2,28 @@
 
 ## Needs implementation
 
-### Current version (Cataract Creek)
-
-- use AddressOf instead of AssignRef
-- revise all commentary
-- blog post
-- release
-
 ### Next Version (Govetts Creek)
+- split base_prototype into num/bool/str/label/none
 - int nat cyc {i,n,c}{8,16,32,64} - maybe not cyc - it needs size.
 - ops: # & | ~ &~  - no shift: use (N * #shift) or (N / #shift)
 - op=
 - enum, with multi-valued names.  enum foo { yes, no, many(10) }
   bar:foo=.yes; if bar == .no... if ?bar.many: print bar.many, "items"
-  Maybe .true and .false for Boolean
+  Maybe .true and .false for Boolean.
 - change use/case labels to create a local enum if no type is evident.
 - set, with bool or int members.  set foo { pinned, memalloc, priority(4) }
   bar:foo = .memalloc | .priority(2). if bar.pinned: bar.priority += 1
 . array slices - references to arrays  "foo: []bar"
-- array access to read bytes from strings.  How to get length?  "?string[4]" ??
-        array[] gets length??
+- array access to read bytes from strings. array[] gets length
+- remove 'use', replace with 'select' for non-bool and 'continue' for bool and "return" for function
+- "return" should convert a referenct to a reference if needed.
 - remove all tests on type->functions
 - use a type->function for performing function call
 - revise all commentary
 - blog post
 - release
 
-### Subsequent version
+### Subsequent version - Nepean River ??
 - Maybe allow a reference to be passed to function where the by-value is expected
 - 'return' statement similar to 'use', but only valid a function context
 - 'return' can take no value when function has inline/transparent return value
 - 'use' labels *must* appear in case statements.
 - 'then' can extend a case section into some other.
 
+### And then ...
+- constructors(called by @new) and destructors (called by @free)
+- "?type" which includes an error flag in the type
+- interfaces - with syntax for function type declarations, including
+   type parameterisation
+- const arrays that are extended incrementally
+- enums that are extended incrementally
+- enum as array index.  foo:[:enum]int.  foo[.baz] = 23
+- modules - exported names in versions, and import lists
+      on types, fields, constants, etc
+- foreach variable-list := make_generator() do
+      A generator has 'first', 'next' and 'finally' methods
+      'first' and 'next' return the same type which is conditional ('?' works)
+      'finally' returns some other type - possibly Tnone - which goes to
+      a set of case at end of loop
+    NOTE need to understand how break/continue are handled.
+- lamba - inline functions.  If possible allow a syntax that looks like 'while'...
+- "run" statement which copies things to a new frame and runs in
+    parallel.  It has no 'return' value
+
+### static analysis
+- add generic attributes with rules for what values are allowed with
+  which attributes.  Need to track:
+    - when object should be freed
+    - when ref is NULL
+    - when value is valid
+    - when int is in some range
+    - when object is "locked"
+  structures can have virtual 'state' fields which align with attributes
+  and certain state values imply certain attributes.
+
+### export
+- structs which have endian and are not sorted (records)
+- interface to C api (FFI)
+
+### escape
+- for an attribute
+- convert between integers and refs.  
+
+### compile time reflection
+- code that can interpret attributes etc??
+
 ## Needs Design
 - review {} syntax issues - look at weird test cases
 - do I need a 'rune' type? What are the elements of a string?
 
 - can "A if B else C" have "A" and "C" be different - one a ref and one not?
   This might make sense if a ref was wanted - an lvalue is then accepted.
+  But then the ref can have '@' applied so it becomes an lvalue.  So "no".
 
 - ? modifier for type makes "no such value" an option, detected by '?' operator
 - $ operator to convert to ?number from ... ref? enum?
   We might want tracing, consistency, profiling, etc.
 
 - union types - how do I want to support these? inheritance with variance?
+- how are mixins represented?
 - lambda
 - 'error' value for various types. NIL for pointer NaN for float, extra flag bit
    for integers.  -MAX_INT ??
 - 'borrowed' and 'owned' attributes for pointers.  .free method
 - interfaces - list of methods that must be defined
 - standard interfaces to access operations: group, field, binary, logical
-- modules - exported names in versions, and import lists
-      on types, fields, constants, etc
-- foreach variable-list := make_generator() do
-      A generator has 'first', 'next' and 'finally' methods
-      'first' and 'next' return the same type which is conditional ('?' works)
-      'finally' returns some other type - possibly Tnone - which goes to
-      a set of case at end of loop
+    How is compatibility of type for second argument assessed?
+    For integers we allow upgrading or even down-grading??
+   This is for overloading operators.  Can we combine them?
+    * / % + - neg abs
+    and or not
+    ++ ?? ?
+    []
+    () (funcall)
+    if/else
+    < <= > >= == !=
+    # & | ~ &~
+
+    I think and/or/not/if-else/??/?  cannot be overloaded
+      Can '?' be used to mae booleans of anything?  How does that
+      interfere with jusing it to test a reference?
+      i.e. how do a query an object when I have a ref?
+    "compare" can, but it is one operator with aliases. or maybe 2, eql and cmp
+    ++ [] definitely can be overloaded though [] need to know if assignment or access
+    assignment?? Can that be overloaded i.e. trigger on access.
+    () can be redirected via 'transparent' function member
 
 - attributes for fields and local variables
     transparent - names inside can be accessed directly