Closed Mossaka closed 1 year ago
Could you expand a bit about the semantic meaning of the
include
statement? For example whenwith
is required, whatwith
does, wheninclude
might fail, etc.
Good suggestion. I have thought about that but then I saw the section I've modified is for Lexical Structure. Is there a dedicated section for semantic structure of WIT? If not, I can expand the the semantic meaning in the part where I modified. @alexcrichton
The top of the document is probably the best place for that right now, probably around the area that world
s are explained.
so if the same interface is imported into two worlds which are union'd then it's required that a deduplication happens rather than emitting two separate imports (e.g. resolving with with isn't valid)
That's a really good point. Transient deps are always hard haha. I will update the doc to include de-dep semantics.
~one way to make this less verbose than:
world union-my-world {
include self.my-world-1
include self.my-world-2
}
... could be to change the world
word itself – something like universe
might be fitting:
universe union-my-world {
self.my-world-1,
self.my-world-2
}
Of course, this would mostly just be syntactical sugar – the union of worlds should still equate to a world.
@alexcrichton thanks for reviewing. Could you please take another look?
I will rebase once #198 is merged in.
Okay, I think this PR is ready to review @guybedford
Thank you, @lukewagner !! I have committed your suggestions.
Thanks everyone for reviewing this!! This meant a lot to me as it marks the first contribution I've contributed to a Wasm proposal. Cheers 🙌 🥂
As proposed by #169 , this PR adds an
include
keyword to the WIT.md. It also sorts the keyword list alphabetically.