kyren / piccolo

An experimental stackless Lua VM implemented in pure Rust
Creative Commons Zero v1.0 Universal
1.62k stars 59 forks source link

Small detail about JS Functions in your post. #61

Closed ShawSumma closed 4 months ago

ShawSumma commented 4 months ago

In your post you do something that looks like (() => { /* code here */ }).bind(this)

This is good code but this is already bound.

JavaScript arrow functions are different to function functions in that they bind this in their closure.

It would help my JS brain if this was fixed. Thanks!

kyren commented 4 months ago

Thanks, fixed!

I'm not terribly experienced with javascript, so I didn't actually know that, thank you for telling me!