gleam
gleam copied to clipboard
Marking functions as deprecated
trafficstars
When a deprecated function is used we want to detect this and emit a warning at compile time.
What should the syntax be? How should this be exposed to the user?
Possible attribute/tag syntax:
#deprecated()
pub fn one() { ... }
#deprecated(since: "1.1.0", note: "Will set fire to your laundry")
pub fn two() { ... }
is the decorator syntax already standardized or would it be a first ?
No syntax has been finalised and there is no decorators or similar yet. Bikeshedding and such is very welcome
Updating the issue as the attribute syntax has been standardised.
What fields should the attribute have? Are they always required or are some optional?