WebAssembly / WebAssembly/component-model
Consider adding support for identifier aliases
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
Over in #311, @oovm points out that the fact that components broadly include identifiers in their public interfaces means that it's hard to fix naming mistakes in stable APIs.
I wonder if it might make sense to explicitly support aliases for identifiers in all or most positions to address this: for interface, type, and function names, but ideally also for parameter and return value names.
I think a good way to integrate this would be to introduce a specific structured annotation for aliasing, and support that in all places where an identifier is allowed.
Bindings generators could then use these annotations to generate bindings for all the aliases, and have them use the original identifier internally.
(And if we want to fix a naming mistake, we could maybe do so by changing the name, but introducing an alias for the old name.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #311 and the linked structured annotation proposal in issue #58. Identify how aliases should apply to interface, type, function, parameter, and return value identifiers, and how binding generators would use them. Done means the aliasing scope and integration approach are agreed for the Component Model specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100