- TDP-2-009proposed
Closures and function values
Add anonymous functions that can capture variables, passed and stored as function values, in four phases from capture-free to stack-allocated environments.
- TDP-2-010proposed
Generic inference from arguments and return types
Infer a generic struct's type arguments from a constructor's arguments, allow type parameters that appear only in a return type, and add constructors that carry their element type.
- TDP-2-011proposed
Iteration over collections and storable slices
Let
for x in listwork over the standard collections through a simple protocol, and let aSlice<T>be stored in fields, returned and kept in collections. - TDP-2-012proposed
Richer patterns and enum payloads
Make
compareusable as an expression, add range and nested or-patterns, and let plain enums carry data. - TDP-2-013proposed
Error traces, closed error sets and panic backtraces
Show where an error travelled and where a panic happened, and let a function declare exactly which errors it can return.
- TDP-2-014proposed
Circular imports
Allow two modules to import each other, so a program that is rejected today for a cycle compiles.
- TDP-2-015proposed
Runtime debug checks
Add an opt-in build mode that catches misuse of the manual heap with a named panic, and turn it on by default at
-O0in 3.0.