craftinginterpreters icon indicating copy to clipboard operation
craftinginterpreters copied to clipboard

Inconsistent signatures for `Environment.getAt/assingAt`

Open pekkaklarck opened this issue 2 years ago • 0 comments

Signatures at Environment.java are:

Object getAt(int distance, String name)
void assignAt(int distance, Token name, Object value)

Using either String or Token as the type of name would fix the inconsistency. Using Token would also be consistency with get and assign which actually need a Token. Both getAt and assignAt would be fine also with String.

pekkaklarck avatar Aug 26 '22 15:08 pekkaklarck