Looking again, I think having them as regular variables is not great, because name is optional for techniques and passes. And having a name is a minimum you'd expect from a variable.
We can generate names if necessary. It also shouldn't be too difficult to handle nameless variables, but generating a name is probably easier.