Replies: 2 comments 4 replies
-
This is on the roadmap, and definitely will be done, it will be just like as Lua (as you first example). I expect this to be one of the next new language features. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Just updating, modules system has been implemented recently, you can now return types from modules, it works as the first idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In lua, we can return value from a lua file, but it is impossible in nelua for now (because require return void, and cannot return type so it cannot be used as module namespace).
Idea: make this valid
mymodule.nelua:
main.nelua:
Alternative syntax(syntax sugar)
mymodule.nelua:
Beta Was this translation helpful? Give feedback.
All reactions