From b07cd85563bb728e47d3781428d74c81db76e45e Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 8 Dec 2021 16:24:35 +1100 Subject: [PATCH] updates --- 00-TODO | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/00-TODO b/00-TODO index ded8048..02c22ee 100644 --- a/00-TODO +++ b/00-TODO @@ -4,8 +4,9 @@ ### Current version (Cataract Creek) -- reference to struct or intrinsic (@foo), with @new, @free, @nil and ? to test - allow passing objects to functions by reference is requested +- '.' modifier to auto-add derefernce if needed +- Assign/Decl to accept lvalue for assigning to reference - 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 @@ -17,7 +18,6 @@ - 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 @@ -55,6 +55,21 @@ - 'then' can extend a case section into some other. ## Needs Design +- 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. @@ -81,6 +96,12 @@ 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 -- 2.43.0