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
I've noticed that metamethod names still require the __ in front of their names. I'd like to suggest changing this so the __ gets added automatically and the programmer only has to write add, tostring, etc.
The text was updated successfully, but these errors were encountered:
Hm I'm not sure about that. The double underscore signifies that those methods are special methods. I realize that the operators keyword also does this, but Lua developers are used to this. So I'd be changing an existing and familiar concept into something else, which would make it harder to recognize by someone who isn't using lua-pie
I can only speak for myself here, but the operators keyword makes it fairly clear that these are operators and I expect most users would still understand what's going on quite easily.
The main argument I see in favour of removing the __ is that this is really just an implementation detail; a user of the framework shouldn't need to know if the operators are implemented using metamethods (If they know Lua, they will guess that's how it works), just that it works the way it does.
I've noticed that metamethod names still require the
__
in front of their names. I'd like to suggest changing this so the__
gets added automatically and the programmer only has to writeadd
,tostring
, etc.The text was updated successfully, but these errors were encountered: