-This is a living document - delete things when done. Avoid discussion.
-
-NOW:
- - handle free_type more cleanly??
- - rethink line-like parsing. Should element also start a line?
- - review simple/complex parsing options in various situations
-
-Current version (Jamison Creek)
- - clean up
-
-Next version ??
-- spaces in numbers
-- # not comment?? - automatic if used as a mark.
-- can I move 'ok' into the parse context? Then error functions can set it.
-- allow something so I don't need to call config2context so often
- Some code stanza to be added to do_reduce()
-- structs
- - const fields
- - anonymous field - array or struct (or pointer to these)
- multiple anon struct ar allowed if they don't conflict
- - [] can apply to anon array field
- - anon struct field gets fields interpolated
-
-- change 'labels' to only be created for 'use'
-- handle syntax errors better - recover quickly.
-- manifest values for arrays and structs [a,b,c]
-- yet more operators
- << >> #
- bit-ops & | ~ &~
- op=
-- split values so I can have an array of just the value (1 byte for u8)
-- integers, unsigned, bitfield, float
-- pointers
- - owned or borrowed
- - overloaded or pure
-- array slice
-- array buffer - can be added to and grows.
-- char, string search, regexp search
-
-- allow "do stuff" as a stand-allow statement (scope)
-
-
-Much later
-- functions and procedures
-- per-field attributes
-- records
-- enum
+# This is a living document - delete things when done. Avoid discussion.
+
+## Needs implementations
+
+### Current version (Cataract Creek)
+
+- allow global names to be used before they are declared. Assume global
+ if undeclared, and complain in final analysis.
+- allow type names to be used before declared. Need to re-evaluate all
+ type sizes after parse.
+- resolve the HACK of allowing assign from struct when name starts space.
+- '?' 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 or intrinsic (@foo), with @new, @free, @nil and ? to test
+- add [] as size-of-array
+- replace [foo::] declaration of array with [] - fix all main() calls
+
+### Next Version (Govetts Creek)
+- 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
+- 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
+- array access to read bytes from strings. How to get length? "?string[4]" ??
+ array[] gets length??
+
+### Subsequent version
+- 'return' statement similar to 'use', but only valid a function context
+- 'return' can take no value when function has inline/transparent return value
+- simple methods. Define "func type.name...." and the name will only be visible
+ within namespace for type.
+- 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 if attribute 'open'
+ do I need attribute? Can anything be type compatible with both X and []X ??
+- initial values for return parameters
+- convert between string and array-of-cyc8
+- float64 float32
+- transparent fields, parameters which are structs or pointers
+- transparent fields which are arrays
+- transparent results from functions to have same effect as inline-results
+- manifest values for records: [.foo = a, .bar = b]
+- manifest values for arrays: [expr = expr, ...]
+- constant structure definitions
+- const structures can inherit from another, and update select fields.
+- 'use' labels *must* appear in case statements.
+- 'then' can extend a case section into some other.
+
+## Needs Design
+- union types - how do I want to support these? inheritance with variance?
+- lambda
+- 'error' value for various types. NIL for pointer NaN for float, extra flag bit
+ for integers. -MAX_INT ??
+- enum as array index. foo:[:enum]int. foo[.baz] = 23
+- init_only fields
+- const fields in structs: like const, but in 'type' namespace, not 'module'
+- '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
+
+- attributes for fields and local variables
+ transparent - names inside can be accessed directly
+
+ handled - accesses convert to function calls??
+ constant - compile time constant - not stored
+ stable - ??
+ add-only - ?? like append-only.
+ read-only - set early never changed?
+ mutable
+ owned - Can be borrowed and freed
+ borrowed - There is somewhere this is borrowed from
+ dependant - ???
+ pure - definitely not an error
+ endian(big,small,pdp)
+ attributes for whole struct
+ unsorted - fields appear as written
+ packed - like unsorted, but no gaps permitted.
+
+- lambda functions for passing as arg to function.
+ Are these always there to provide an interface for a value?
+ Do I want a syntax for functions that just provides a value
+ func (a:number; b:string):number = a+b[]
+
+- units for numbers
+- iso suffixes for number?
+- static variables. Easy to implement, but need a syntax. Something
+ really loud.
+- concurrency
+ implicit and explict
+ reference attributes for locks and refcounts etc
+ RCU
+ - do/go/run/fork/async complex statement
+ All local variables accessed in the body are read-only
+ and copied to a new frame, and code is run in a new thread.
+ Thread is mostly invisible. It interacts through shared objects,
+ particularly the caller might create a channel and the thread
+ might send messages on it. Any interesting handshakes
+ are mediated by appropriate data structures.
+
+- arbitrary value asserts tied to variable attributes.
+ e.g. ranges for value and relationships between fields
+ These are tested by compiler at any changed. Somehow.
+
+- 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.
+
+- Finalize what a "main" program looks like.
+ should argv come from a library (sys.argv), or should environ go to main?
+