File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,6 +153,16 @@ namespace pythonic
153153 // and require manual lifetime management in var's constructors/destructor.
154154 // And as they are heap-allocated memory and heap-allocation is performence costly, need to optimize or minimize frequent allocation and deallocation
155155
156+ // ============================================================================
157+ // TODO: Rule of Five: Destructor, copy/move constructor, assignment for var (see memory safety notes below)
158+ // TODO: Audit all unchecked union accesses (e.g., as_int_unchecked) for type safety
159+ // TODO: Consider using std::shared_ptr or copy-on-write for heap objects to avoid ghost/dangling references in views/enumerate/zip
160+ // TODO: Dict/Set: Detect mutation during iteration and throw, like Python (avoid iterator invalidation crashes)
161+ // TODO: Enforce deep const-correctness (const var should not allow mutation of underlying data)
162+ // TODO: Refactor operator+/-/* etc. to use a dispatch table (function pointer matrix) for efficiency and extensibility
163+ // TODO: Audit string-numeric promotion logic for Pythonic strictness
164+ // ============================================================================
165+
156166 union VarData
157167 {
158168 bool b;
You can’t perform that action at this time.
0 commit comments