X-Git-Url: https://ocean-lang.org/code/?p=ocean-D;a=blobdiff_plain;f=00-TODO;h=ded804871cafc76738b857a4a331b546154caf38;hp=c4978a79fa6b4b2a913fe20df4e38d7b72c4cb2f;hb=36f0b2fe19678c2888d74d337885d7c98abe44cd;hpb=95060a31f56b05d2ac6dd87c9d102f76be1b8174 diff --git a/00-TODO b/00-TODO index c4978a7..ded8048 100644 --- a/00-TODO +++ b/00-TODO @@ -4,19 +4,14 @@ ### Current version (Cataract Creek) -- allow global names to be used before they are declared. Assume global - if undeclared, and complain in final analysis. - If used in 'use' and 'case', then make it a label -- avoid definition loops in global constants -- allow type names to be used before declared. Need to re-evaluate all - type sizes after parse. avoid loops -- 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. @@ -30,9 +25,12 @@ 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 @@ -55,12 +53,34 @@ - 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 +- 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 @@ -81,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 - ?? @@ -101,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