]> ocean-lang.org Git - ocean-D/blobdiff - 00-TODO
updates
[ocean-D] / 00-TODO
diff --git a/00-TODO b/00-TODO
index 25b8eb127dca08f3154a57a45e83ad956ad388aa..eafc4eec4ee1e890d3ffa76b96bc377e707bdc1f 100644 (file)
--- a/00-TODO
+++ b/00-TODO
@@ -1,20 +1,44 @@
 This is a living document - delete things when done.  Avoid discussion.
 
 Current version (Cataract Creek)
-- functions to return type with 'use'
-- functions to return structure with name assignment - bare 'use'?
-- '?' prefix operator returns Boolean
-- reference to struct (@foo), with @new, @free, @nil
-- more number types, no units yet
+- _interp_exec() to accept a value*, and type, and only copy large value there.
+- functions to return struct with name assignment - bare 'use'?
+    struct is open-coded in header.  Later a similar effect
+    could be achieved with a named struct marked 'transparent'
+- '?' prefix operator returns Boolean, index operator for strings. Can be used to
+   test for end-of-string
+- ?? infix operator return LHS if '?' on it would succeed, else RHS
+- reference to struct (@foo), with @new, @free, @nil and ? to test
+
+Next Version (Govetts Cree)
+- int nat cyc {i,n,c}{8,16,32,64}
+- # & | ~ &~  - 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"
+- set, with bool or int members.  set foo { pinned, memalloc, priority(4) }
+  bar:foo = .memalloc | .priority(2). if bar.pinned: bar.priority += 1
+
+Subsequent version
+- simple methods.  Define "func type.name...." and the name will only be visible
+  within namespace for type.
+- array access to read bytes from strings.  How to get length?  "?string[4]" ??
+- optional args for functions - if value given
+- named args?  Needs to look like manifest structs
+- array args - last parameter can collect all remaining as array.
+
+And then
+- float64 float32
+- enum as array index.  foo:[:enum]int.  foo[.baz] = 23
 
 Later
 - string manipulation
-- file i/o
-- enum
-- basic methods
 - structs
    - const fields ... what does that mean?  Assign once as initialization?
       Can be used for array size? What else?
+      'const' is wrong word.
+      I want 'const' for record to be type-wide constants, like enum.  I think
+      These would become read-only.  Maybe "init_only"
    - anonymous field - array or struct (or pointer to these)
       multiple anon struct are allowed if they don't conflict
       no - transparent fields!  They still have a name, but you can
@@ -27,6 +51,9 @@ Later
                x:content  transparent
                size:number
 
+- static variables.  Easy to implement, but need a syntax.  Something
+  really loud.
+
 - manifest values for arrays and structs [a,b,c]
     or [.foo=a, .bar=b] or [ [1]=a, [2]=b]
    That last doesn't parse easily, unless we require tags... not a good idea.
@@ -37,13 +64,13 @@ Later
      .foo=a
    is an expression means a structure with a .foo field assined to 'a'
      [3] = 2
-   is an array for at least 4 elements with 4th set to 2.
+   is an array of at least 4 elements with 4th set to 2.
+  Or: an expression that starts '[' is a manifest struct or array.
+   It contains ',' separate list of assignments.
+   Each is either ".name = expr" for struct or "expr = expr" for array
+   Except that would prevent array with enum index.  Is that a problem?
+
 
-- yet more operators
-     << >> #
-     bit-ops & | ~ &~
-     op=
-- integers, unsigned, bitfield, float, double?
 - pointers
    - owned or borrowed
    - pure, loaded, overloaded, augmented
@@ -51,10 +78,14 @@ Later
    - shared or thread-local
 - array slice
 - array buffer - can be added to and grows.
-- char, string search, regexp search
 
 - allow "do stuff" as a stand-alone statement (scope)
 - 'use' labels *must* appear in case statements.
+- 'then' can extend a case section into some other.
+
+- expose parse info for editing by code run at compile time.
+  This allows new attributes to be implemented in app code.
+  E.g. handling bigendian fields by adding conversion functions.
 
 Next version (Govetts Creek):
 - functions and procedures
@@ -74,7 +105,7 @@ Much later
 - interfaces, inheritance
 - modules, imports and exports
      public(version) on types, fields etc
-- closures, threads, co-routines, generators
+- closures, threads, co-routines, generators lamdas
 - generics/templates.  These should be just a compile-time
   decision.  Same code can be called with suitable methods passed, or
   recompiled in the new context and then optimised.
@@ -84,12 +115,7 @@ Much later
       measure coverage, adjust based on performance metrics
       auto-create mock objects
       Is this just parsing the details in the obj file?
-- % formatting
-- string / slice / strbuf
-- parsing library - sscanf equiv, regexp, LALR
 - FFI
-- GTK
-- sockets / http / HTML
 - parameterised types, and dependant types
 - message passing primitives
 - overloading for numbers
@@ -101,6 +127,17 @@ Much later
 - typeswitch?
 - iso suffixes for number?
 - foreach?
-- case fall-through or go-to
-- break/continue or "next","last"
+- break/continue or "next","last" - hopefully 'use' is enough
 - algebraic types
+
+Library functions:
+ - UTF8 string disection
+ - search, regexp
+ - cvt() interface an format() function
+ - parsing: rexep? LALR? sscan?
+ - buffered file IO
+ - auto-growing buffer including strings
+ - sockets
+ - http
+ - html
+ - gtk? xcb?
\ No newline at end of file