Hacker News new | ask | show | jobs
by ebg13 2200 days ago
> Lua can have functions that assume a "this" parameter (Lua calls it "self")

Even Lua's assumed "self" via the thing:funcname(...) call is just a charade and is secretly just thing.funcname(thing, ...). The split between . and : calling, IME as an informal Lua teacher, is confusing to programming newbies when they first encounter it and I kinda wish the language hadn't chosen _that_ as the thing to spend time implementing.

1 comments

The same is true in C++ and Java, only the "self" argument is completely hidden in that case.