Adding function’s internal parameters name to package-interface.json #3127
ghivert
started this conversation in
Ideas & suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi !
Right now, package-interface.json is a way to gather all useful intermations about a package, from documentation to docs to types to functions. They're great, and it's a wonderful way to provide a unique, unified interface in the long run for all toolings and to improve the Developer Experience in general.
By focusing on package-interface, a lot of boring things in other languages (analysis, semantic analysing, etc.) can be completely skipped.
However, as of now, there's no information on the internal functions parameters name. The only useful information we can get is the optional label, but names are erased in the interface.
Adding the names would improve the package interface:
It's also a non-breaking change, because they're an addition only to the package-interface.json, meaning existing code won't break, the new field will just be ignored.
In my opinion, they're a great addition in the same sense than keeping the variables types name would be a great addition (
update: fn(msg, model) -> #(model, Effect(msg))
is not more accurate thanupdate: fn(a, b) -> #(a, Effect(b))
from the compiler point of view, yet it's a great addition for readers).Beta Was this translation helpful? Give feedback.
All reactions