According to the WIT documentation, an identifier must be proceeded by a single % sign if the identifier would otherwise be a WIT keyword.
Suppose someone makes a user-defined type called struct, and they do not prefix it with % because struct is not a keyword.
Suppose later, in a newer version of WIT, struct becomes a keyword. Then, their WIT code breaks because their user-defined type struct is not prefixed with %.
Perhaps, keywords and primitive types in WIT should be prefixed with some character that is not allowed in user-defined identifiers. That would allow addition of keywords and primitive types in the future without breaking old WIT code that uses those keywords as identifiers. Otherwise, I feel technically incentivized to add % to every user-defined identifier, but that does not feel good.
According to the WIT documentation, an identifier must be proceeded by a single
%sign if the identifier would otherwise be a WIT keyword.Suppose someone makes a user-defined type called
struct, and they do not prefix it with%becausestructis not a keyword.Suppose later, in a newer version of WIT,
structbecomes a keyword. Then, their WIT code breaks because their user-defined typestructis not prefixed with%.Perhaps, keywords and primitive types in WIT should be prefixed with some character that is not allowed in user-defined identifiers. That would allow addition of keywords and primitive types in the future without breaking old WIT code that uses those keywords as identifiers. Otherwise, I feel technically incentivized to add
%to every user-defined identifier, but that does not feel good.