# This is a living document - delete things when done. Avoid discussion.
-## Needs implementations
+## Needs implementation
### 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
+- use AddressOf instead of AssignRef
+- revise all commentary
+- blog post
+- release
### Next Version (Govetts Creek)
- int nat cyc {i,n,c}{8,16,32,64} - maybe not cyc - it needs size.
- 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
+- 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
+. array slices - references to arrays "foo: []bar"
- array access to read bytes from strings. How to get length? "?string[4]" ??
array[] gets length??
+- remove all tests on type->functions
+- use a type->function for performing function call
+- revise all commentary
+- blog post
+- release
### Subsequent version
+- 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
- simple methods. Define "func type.name...." and the name will only be visible
- 'then' can extend a case section into some other.
## Needs Design
+- review {} syntax issues - look at weird test cases
+- do I need a 'rune' type? What are the elements of a string?
+ Are they small strings? Can I convert to codepoint by treating as number?
+ How much of this is in the utf8 library? Can a string literal be a number?
+- exactly where does auto enref/deref happen?
+ .foo modifier does auto-deref
+ (args) modifier does auto-deref (if that makes sense)
+ assignments does auto-enref
+ function parameter passing does auto enref and auto deref
+
+ general operators? Not comparison. Not test. Probably not anything.
+
+- 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.
+
+- ? modifier for type makes "no such value" an option, detected by '?' operator
+- $ operator to convert to ?number from ... ref? enum?
+ ?$"hello" can test if the conversion would work. '$foo ?? default'
+ provides a default value
+- a suffix on a number/string can provide soft typing which is interpreted
+ in type context. Must like .enumvalue is interpreted only the context of
+ expected type, '43i' would only be meaningful in the same context.
+- const arrays that are initialized incrementally throughout the code,
+ and post-processed at compile-time, e.g. to sort or derive LR tables.
+ Maybe even across modules.
+ Need a syntax
+ Maybe 'const' can be followed by name of a const which forms the namespace.
+ So a struct bar containing x and y could be initialized
+ const foo::bar
+ x ::= 1; y::=2
+ Then an array could be extended with [+]
+ const ra[+]
+ x::=2 ...
+
+ The syntax needs to be clearly different from
+ const a::num=1; b::=2
+ if that is still allowed
+ Maybe the '=' is enough to differentiate
+
+- IN and OUT should not be completely ignored when not expected.
+ As well as causing NEWLINE to be ignored, there should be some
+ balance requirement. Some productions should be required to be
+ balanced. Lists should not have gratuitous indents.
+ Revisit everything I considered before, but now consider it only
+ for ignore IN/OUT.
+
+- "debug" code that can be compiled out. For code, "if debug" is enough
+ if the const can be set easily. For structure members a 'debugonly'
+ attribute needs to be handled. Of course 'debug' is multifaceted.
+ We might want tracing, consistency, profiling, etc.
+
- 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
- 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 - ??
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
NO- typeswitch?
- ??? algebraic types
+- code can appear in multiple forms:
+ - source code
+ - abstract syntax tree
+ - byte-code
+ - loadable machine code
+ - executable-only machine code
+ All but last can be loaded by 'ocean' and transformed into a later form,
+ or executed directly. byte-code and loadable machine code will likely
+ have ast content was well to describe types and provide template code.
+
## Needed in library
- augmented and overloaded pointers
An augmented pointer can also store a flag- for a bitlock etc