The stated reason was that native and wasm32 must behave identically, which is misleading: we do not develop on wasm32 and only ever export to it. The reasons that hold are all release-side. wasm32 cannot unwind without the exceptions proposal, so the export would not work at all. Native unwinding is not cheaper and is much less legible - every call becomes an invoke with a landing pad, where a cmp/jne after a call reads like ordinary code, which will matter once there is a disassembler. And one mechanism is one thing to get right, since the acceptance table runs the same programs on both targets and compares a hash. The channel is an out-parameter rather than a discriminated return value, which §6 had left open. The return type then stays what the source says; a discriminated return would repack every ret, turn an aggregate return into an sret call, and nest inside the discriminated return (Option T) already is. One pointer threads down the chain, so a callee writes the target into its caller's own slot and each frame only checks and returns early - reusing the existing return path and therefore §5's defers. A single global would be more legible still, with no signature change at all, but it is not re-entrant: §5 runs defers during a transfer, so a defer that signals and invokes a restart would start a second transfer over the first.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%