elixir-nx / nx

Multi-dimensional arrays (tensors) and numerical definitions for Elixir
2.66k stars 194 forks source link

Automatically track which variables are inside if/cond/while #1467

Open josevalim opened 8 months ago

josevalim commented 8 months ago

Today this is done by the compiler, but it pushes a lot of complexity elsewhere. The if/cond/while nodes should automatically track the environment before them and keep it around. This will also allow us to implement while as closures.