So a long while back I learned a trick with Lua coding where you could create variables in the parameters that you wouldn’t pass to, and use those instead of local variables.
During the time, there was a practical reason to do this in order to avoid memory leaks in a faulty game engine.
I’m curious about the practicality of using parameters for variables in the Roblox engine.
I.E.
function foo(bar)
bar = Instance.new("World")
print(bar)
end
Probably none, as far as I know, a local variable would have no more memory impact than an empty parameter initialized as the value in Luau. As Studio is a mostly online game engine (i.e. you have to be connected to the internet to start it up), even if this issue existed someone could make a GitHub issue on their official page and it would be fixed for everyone.