# NIL Design Notes
(This is a WIP design note to capture ideas)
- NIL is the name for the future “Numba Intermediate Language”, a new IR for the compiler.
- NIL will use xDSL/MLIR to capture the RVSDG so it will encode a higher level semantic; regions will provide a hierachical abstraction that maps nicely to different dialects in xDSL/MLIR.
## Special considerations
### Context-aware typing
It is quite common for containers (array/dataframe) to be initialized with Python builtin types (`list`/`tuple`/`dict`). While in other places, Numba will require these builtin types to be mono-typed. When they are used as initializers, there is an opportunity to change the type-rules for better match to the Python libraries' behavior.
With changes in the Numpy2.0 typing rules (NEP-50) and issues like https://github.com/numba/numba/issues/9078. There is a need for a context-aware typing. The use of:
```python
np.array([[0], [1.0]])
```
will currently cast a casting error because `[0]` is list of `int` but `[1.0]` is a list of `float`. However, if we recognize that these list are single-use and read-only, we can more easily loosen up the casting rules so that we match the flexible typing in Python better.