Over the past couple years I’ve overlooked this question and never really though about it. There are two different ways to write a function and they both seemingly do the same thing and I’ve been using the two interchangeably without realizing it. Here’s what I mean:
--Which is better?
local function name()
end
local name = function()
end
The two samples above are both valid functions, but what’s the difference?
Is one of them the “correct” way? Is one more efficient than the other? It seems like such a silly question to ask considering that functions are fundamental to scripting but it’s something that I’ve neglected to ask for a while.