Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
TetraSource

Moon - Python like OO in Lua

Recommended Posts

Hello everybody!

I just finished the work on Moon, a library for Lua 5.3 that provides a class system along with the corresponding functions inspired by the one of Python. It supports multiple inheritance by using a MRO, operator overloading, properties and metaclasses. However, it is rather optimized on flexibility than performance since creating a lightweight class system ought not to be troublesome in Lua.

I recommend just using it when you already know what OOP means in general but not necessarily in Python. I included an introduction of the concepts that are not present in the most common OO languages in the documentation.

You can download it from github or pastebin (id: RgzJxwVF). If you encounter bugs, please report them on github. The documentation is on github as well. I hope it is able to clear all your questions. An example can also be found on pastebin (id: sxrQPdjL).

If you like Python you might also be interested in this post.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.