munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.43k stars 1.01k forks source link

Inconsistent signatures for `Environment.getAt/assingAt` #1086

Open pekkaklarck opened 1 year ago

pekkaklarck commented 1 year ago

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.