Andreas Rossberg
Andreas Rossberg
A unary tuple can only be written in its desugared form: `{1 : int}`. The expression syntax `(x1,...,xN)` or the type `t1 * ... * tN` is identified with x1,...
I guess I don't see what's wrong with the very syntax you just gave?
Those all seem reasonable to me. Not sure in what sense syntax "follows" types here, there's simply no relation between syntactic arity and number of values. An expression can produce...
@kripken: >> The need for splatting in some languages is merely a consequence of an artificial distinction between tuples and multiple arguments > Some of those languages need such a...
@fgmccabe: > So, in order to know that the syntax is valid, (i.e., not an arity error), you have to know the types of the sub-expressions. "Valid" here means well-typed,...
> Python has tuples and multiple arguments, and I believe it could not manage without splat. No disagreement. When designed around that choice, a language needs extra constructs to convert...
Also keep in mind that Wasm isn't a user-facing language and the role of the Wasm type system is not to guide programmers. It's only purpose is to help engines...
@lukewagner: > We could also say that "throws" is ignored by type equality/subtyping, so that this "throws" effect doesn't create widespread annoyance In that case it would be completely meaningless...
@lukewagner: > What about imports? What matters is the caller's expectation, not the definition of the callee. Subtyping also applies to imports, so if it can ignore throw annotations, then...
@mstarzinger, I think whether JS exceptions are mapped to Wasm exns or to traps is a separate question. When done correctly, effect annotations like "throws" ought to be purely a...