Clarification about Builtins in docs/pages/libraries.md #83
-
I was reading https://github.com/edubart/nelua-lang/blob/master/docs/pages/libraries.md to see whether In Lua I can do Can we make clearer which functions are actually builtin and which are not? A label next to each function will work just fine, like for example |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
The
The documentation already state what functions are builtin, that is, just the functions from "builtins" section from that page. Any other function or method not there will be only available through a module imported with I know it's not ideal the current situation, it's a very common mistake of new Nelua users to attempt to use string methods while forgetting to do |
Beta Was this translation helpful? Give feedback.
-
I see. Can we add a suggestion like GCC's gives us when we attempt to use a function that its header file has not being included? |
Beta Was this translation helpful? Give feedback.
-
Question: how linting flag supposed to work? In my case, should not make sense to throw a list of warnings for missing module(s)? |
Beta Was this translation helpful? Give feedback.
The
string
is builtin type, but methods for it are not, because they generate runtime code. In Nelua you usually need to require a module for APIs that generates runtime code, because what runtime to include is the user choice by design.The documentation already state what functions are builtin, that is, just the functions from "builtins" section from that page. Any other function or method not there will be only available through a module imported with
require
. Though many modules likeio
already requires'string'
. Aside from those builtin functions there are builtin types, likeint64
,float64
, etc, andstring
…