X-Git-Url: https://ocean-lang.org/code/?p=ocean-D;a=blobdiff_plain;f=00-TODO;h=ded804871cafc76738b857a4a331b546154caf38;hp=a973953e12a8706bc8299e8e87cad186f1a17ecf;hb=36f0b2fe19678c2888d74d337885d7c98abe44cd;hpb=bb468d738e5edf523e47206c7eafa0b293b736a6 diff --git a/00-TODO b/00-TODO index a973953..ded8048 100644 --- a/00-TODO +++ b/00-TODO @@ -4,20 +4,20 @@ ### Current version (Cataract Creek) -- 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 @@ -25,11 +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 -- allow global names to be used before they are declared. Assume global - if undeclared, and complain in final analysis. -. 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,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 @@ -78,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 - ?? @@ -98,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