X-Git-Url: https://ocean-lang.org/code/?p=ocean-D;a=blobdiff_plain;f=00-TODO;h=ded804871cafc76738b857a4a331b546154caf38;hp=56d26e39cb03bff4a43ccfb498fccc08b1a5c3f3;hb=36f0b2fe19678c2888d74d337885d7c98abe44cd;hpb=eceb0a08424f3129775dfccc6de1a5f7f5b98d0a diff --git a/00-TODO b/00-TODO index 56d26e3..ded8048 100644 --- a/00-TODO +++ b/00-TODO @@ -4,30 +4,33 @@ ### 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 +- allow passing objects to functions by reference is requested - add [] as size-of-array - replace [foo::] declaration of array with [] - fix all main() calls +- ensure all param passing and value return is handled correctly +- 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. - ops: # & | ~ &~ - no shift: use (N * #shift) or (N / #shift) - op= +- make '.' modifier interpolate a deref if needed - 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 in ".name" which creates 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?? +- revise all commentary +- blog post +- release ### Subsequent version - 'return' statement similar to 'use', but only valid a function context @@ -52,6 +55,32 @@ - 'then' can extend a case section into some other. ## Needs Design +- 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. - 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 @@ -72,7 +101,7 @@ - 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 - ?? @@ -92,7 +121,7 @@ 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