[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: `depreciated` attribute for Lua?
- From: "Thijs Schreijer" <thijs@...>
- Date: Wed, 13 Sep 2023 19:09:49 +0200
You can already solve it with a wrapper, something like;
local function deprecated(fn, msg)
return function(...)
print(msg)
return fn(...)
end
end
local add = deprecated(function(a, b)
return a + b
end, "function add has been deprecated")
add(1, 2) --warning