#RocketLang update:
I added support for "Union types": You can now declare variables (and function parameters of types like int32 | None. The variables can hold values of both types (and functions can be called with parameters of both types).the functionality is still a bit rough around the edges (not as comfortable to use as I'd like), but the core functionality is there.
This is actually on the "critical path" towards my current goal of implementing a unit testing library: When discovering tests (iterating through folders, finding test files, loading them and then finding the test cases in them), I need a list of test-cases. Currently only ArrayLists are (kind-of) implemented. But they require... arrays - and if a type doesn't have a default value, you can't initialise the array.
Concretely: When I'm building a list of test cases, that's a ArrayList[func() -> None]. But func() -> None doesn't have a default value, so creating a RawArray[func() -> None] fails, so there's no list.
Now, with union types I can create an ArrayList[func() -> None] that uses a RawArray[(func() -> None) | None] as backing storage.