It would be nice if we could enter our own helper text (the popup text when typing the parameters for ellipse() for example) for functions or classes we’ve built. Maybe by using special optional syntax, where we define the function or class.
For example:
function doSomething( vel;"velocity", col;"color", a;"angle")
...
end
If you have a complex function, particularly one with multiple optional variables, then consider passing a dictionary of variables to the function eg:
function myClass:init(p) --a single table of parameters
self.vel, self.color, self.angle = p.vel, p.color, p.angle
In Lua, if a function takes a single string or a single variable as its argument, you can omit the () from the call. So you can call the function like this:
Although this is more typing (and slightly more resource intensive as you’re creating a table), it does make the function call easier to read, and is particularly useful where there are multiple optional arguments