You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oof, you're right! I wrote that chapter quite a while after implementing that behavior in Lox and I'm embarrassed to admit I misremembered how my own language works!
I think the simpler fix is to update the text to describe how Lox actually behaves. In a real language, it's probably more usable to convert either operand to a string, but doing that in Lox would add a decent amount of fairly boring code, so the simplest thing is to just leave it out and leave "+" a little less flexible.
According to 3.4.1:
But both interpreter currently say:
The text was updated successfully, but these errors were encountered: