1 # This is a living document - delete things when done. Avoid discussion.
3 ## Needs implementations
5 ### Current version (Cataract Creek)
7 - allow passing objects to functions by reference is requested
8 - '.' modifier to auto-add derefernce if needed
9 - Assign/Decl to accept lvalue for assigning to reference
10 - add [] as size-of-array
11 - replace [foo::] declaration of array with [] - fix all main() calls
12 - ensure all param passing and value return is handled correctly
13 - revise all commentary
17 ### Next Version (Govetts Creek)
18 - int nat cyc {i,n,c}{8,16,32,64} - maybe not cyc - it needs size.
19 - ops: # & | ~ &~ - no shift: use (N * #shift) or (N / #shift)
21 - enum, with multi-valued names. enum foo { yes, no, many(10) }
22 bar:foo=.yes; if bar == .no... if ?bar.many: print bar.many, "items"
23 Maybe .true and .false for Boolean
24 - change use/case labels in ".name" which creates a local enum if no
26 - set, with bool or int members. set foo { pinned, memalloc, priority(4) }
27 bar:foo = .memalloc | .priority(2). if bar.pinned: bar.priority += 1
28 . array slices - references to arrays "foo: []bar"
29 - array access to read bytes from strings. How to get length? "?string[4]" ??
31 - revise all commentary
35 ### Subsequent version
36 - 'return' statement similar to 'use', but only valid a function context
37 - 'return' can take no value when function has inline/transparent return value
38 - simple methods. Define "func type.name...." and the name will only be visible
39 within namespace for type.
40 - optional args for functions - if value given
41 - named args? Needs to look like manifest structs
42 - array args - last parameter can collect all remaining as array if attribute 'open'
43 do I need attribute? Can anything be type compatible with both X and []X ??
44 - initial values for return parameters
45 - convert between string and array-of-cyc8
47 - transparent fields, parameters which are structs or pointers
48 - transparent fields which are arrays
49 - transparent results from functions to have same effect as inline-results
50 - manifest values for records: [.foo = a, .bar = b]
51 - manifest values for arrays: [expr = expr, ...]
52 - constant structure definitions
53 - const structures can inherit from another, and update select fields.
54 - 'use' labels *must* appear in case statements.
55 - 'then' can extend a case section into some other.
58 - exactly where does auto enref/deref happen?
59 .foo modifier does auto-deref
60 (args) modifier does auto-deref (if that makes sense)
61 assignments does auto-enref
62 function parameter passing does auto enref and auto deref
64 general operators? Not comparison. Not test. Probably not anything.
66 - can "A if B else C" have "A" and "C" be different - one a ref and one not?
67 This might make sense if a ref was wanted - an lvalue is then accepted.
69 - ? modifier for type makes "no such value" an option, detected by '?' operator
70 - $ operator to convert to ?number from ... ref? enum?
71 ?$"hello" can test if the conversion would work. '$foo ?? default'
72 provides a default value
73 - a suffix on a number/string can provide soft typing which is interpreted
74 in type context. Must like .enumvalue is interpreted only the context of
75 expected type, '43i' would only be meaningful in the same context.
76 - const arrays that are initialized incrementally throughout the code,
77 and post-processed at compile-time, e.g. to sort or derive LR tables.
78 Maybe even across modules.
80 Maybe 'const' can be followed by name of a const which forms the namespace.
81 So a struct bar containing x and y could be initialized
84 Then an array could be extended with [+]
88 The syntax needs to be clearly different from
90 if that is still allowed
91 Maybe the '=' is enough to differentiate
93 - IN and OUT should not be completely ignored when not expected.
94 As well as causing NEWLINE to be ignored, there should be some
95 balance requirement. Some productions should be required to be
96 balanced. Lists should not have gratuitous indents.
97 Revisit everything I considered before, but now consider it only
100 - "debug" code that can be compiled out. For code, "if debug" is enough
101 if the const can be set easily. For structure members a 'debugonly'
102 attribute needs to be handled. Of course 'debug' is multifaceted.
103 We might want tracing, consistency, profiling, etc.
105 - union types - how do I want to support these? inheritance with variance?
107 - 'error' value for various types. NIL for pointer NaN for float, extra flag bit
108 for integers. -MAX_INT ??
109 - enum as array index. foo:[:enum]int. foo[.baz] = 23
111 - const fields in structs: like const, but in 'type' namespace, not 'module'
112 - 'borrowed' and 'owned' attributes for pointers. .free method
113 - interfaces - list of methods that must be defined
114 - standard interfaces to access operations: group, field, binary, logical
115 - modules - exported names in versions, and import lists
116 on types, fields, constants, etc
117 - foreach variable-list := make_generator() do
118 A generator has 'first', 'next' and 'finally' methods
119 'first' and 'next' return the same type which is conditional ('?' works)
120 'finally' returns some other type - possibly Tnone - which goes to
121 a set of case at end of loop
123 - attributes for fields and local variables
124 transparent - names inside can be accessed directly
126 handled - accesses convert to function calls??
127 constant - compile time constant - not stored
129 add-only - ?? like append-only.
130 read-only - set early never changed?
132 owned - Can be borrowed and freed
133 borrowed - There is somewhere this is borrowed from
135 pure - definitely not an error
136 endian(big,small,pdp)
137 attributes for whole struct
138 unsorted - fields appear as written
139 packed - like unsorted, but no gaps permitted.
141 - lambda functions for passing as arg to function.
142 Are these always there to provide an interface for a value?
143 Do I want a syntax for functions that just provides a value
144 func (a:number; b:string):number = a+b[]
147 - iso suffixes for number?
148 - static variables. Easy to implement, but need a syntax. Something
152 reference attributes for locks and refcounts etc
154 - do/go/run/fork/async complex statement
155 All local variables accessed in the body are read-only
156 and copied to a new frame, and code is run in a new thread.
157 Thread is mostly invisible. It interacts through shared objects,
158 particularly the caller might create a channel and the thread
159 might send messages on it. Any interesting handshakes
160 are mediated by appropriate data structures.
162 - arbitrary value asserts tied to variable attributes.
163 e.g. ranges for value and relationships between fields
164 These are tested by compiler at any changed. Somehow.
166 - expose parse info for editing by code run at compile time.
167 This allows new attributes to be implemented in app code.
168 E.g. handling bigendian fields by adding conversion functions.
170 - Finalize what a "main" program looks like.
171 should argv come from a library (sys.argv), or should environ go to main?
174 - constructors and destructors - or "after" ??
175 destructors, which can be declared inline
176 - vtables, fat pointers, list of approaches
177 - interfaces, inheritance
178 - closures, threads, co-routines, generators lamdas
179 - generics/templates. These should be just a compile-time
180 decision. Same code can be called with suitable methods passed, or
181 recompiled in the new context and then optimised.
182 - introspection / reflection ?
183 e.g. support serialization
184 find function given a string holding the name
185 measure coverage, adjust based on performance metrics
186 auto-create mock objects
187 Is this just parsing the details in the obj file?
189 - parameterised types, and dependant types
190 - message passing primitives
191 - overloading for numbers
193 - ensure list_head type concept can work
195 NO - pattern matching for destructuring??
196 - casts to and from "binary".
198 - ??? algebraic types
201 - augmented and overloaded pointers
202 An augmented pointer can also store a flag- for a bitlock etc
203 An overloaded pointer can alternately store an int - e.g. error code
204 - garbage collection?
205 - UTF8 string disection
207 - cvt() interface an format() function
208 - parsing: rexep? LALR? sscan?
210 - auto-growing buffer including strings