Open tasks collected from in-code comments. Resolve by implementing or opening a GitHub issue.
These can be implemented incrementally once the basic type system is stable.
-
Logical-operator operand types (
ndc_analyser/src/analyser.rs~line 58)and/oroperands are not checked to beBool. Should emit a warning or error when the operand type is known and incompatible. -
Mismatched
ifbranch types (ndc_analyser/src/analyser.rs~line 178) Whentrue-branch andfalse-branch types differ (and neither isAny), a warning could be emitted. -
Missing semicolon warning in
if(ndc_analyser/src/analyser.rs~line 174) When thetrue-branch of anifproduces a non-unit value but noelseis present, a warning for the missing semicolon would be helpful. -
nevertype for variable declarations (ndc_analyser/src/analyser.rs~line 66)let x = …currently resolves tounit. Introducing anever/!type might be more accurate, once the type lattice is fleshed out.
-
Conflicting binding on re-declaration (
ndc_analyser/src/analyser.rs~line 141) When a function name is declared a second time in the same scope, the analyser silently creates a new binding instead of either updating the old one or raising an error. The right policy needs to be decided and implemented. -
debug_assert→unreachable!infind_function_candidates(ndc_analyser/src/scope.rs~line 99) A variadic function match should be impossible at this call-site. Thedebug_assert!(false, …)should be replaced withunreachable!once we are confident the invariant holds.
-
Bitwise NOT on non-integer numbers (
ndc_core/src/num.rs~line 181) Currently!floatand!rationalreturnNaN(matching Noulith behaviour). Decide whether this is intentional for this language or whether it should be an error. -
bigint → introunding in floor/ceil/round (ndc_core/src/num.rs~line 584) After rounding aRational, the result is converted toBigIntrather than trying to fit it back into a machinei64. Should attempt the smaller representation first. -
Division performance (
ndc_core/src/num.rs~line 323)Divalways promotes both operands toRational. In the commonInt / Intcase this is unnecessary. A fast path for integer operands would avoid the allocation.
-
Unicode escape sequences (
ndc_lexer/src/string.rs~line 72) String literals do not support\uXXXXescape sequences. Add support. -
_separator after decimal point (ndc_lexer/src/number.rs~line 130)1_000.0is valid, but1.0_0is probably not intended. Consider rejecting_after.. -
Number suffix error interception (
ndc_lexer/src/number.rs~line 48) The suffix-error checks insidelex_numbermay be redundant since no numeric suffixes are supported. Consider moving the check to after the lexer returns so it applies uniformly. -
validator_for_radixperformance (ndc_lexer/src/number.rs~line 231) The string-slice approach for validating digits by radix is O(radix) per character. A lookup table orchar::to_digitwould be faster. -
consume()internal error handling (ndc_lexer/src/lib.rs~line 202)consume()panics withexpecton underflow. Document the invariant or add a proper internal error type.
-
Better error for boolean-returning
ifwithout semicolon (ndc_parser/src/parser.rs~line 738) The patternif x == y { true } else { false }triggers a generic parse error. A targeted diagnostic would be more helpful. -
"Expected expression" error quality (
ndc_parser/src/parser.rs~line 1001) The fallback "Expected an expression but got '…'" message may not always accurately describe the failure. Audit and improve.
- Error rendering in block-scope test (
tests/programs/004_basic/005_block_scope_destroys_local_variables.ndcline 6) The error is reported correctly but rendered weirdly in the test output. Investigate why and fix the display.