In looking at WAVE mapping to value defs (ref #639 (comment)) I found some quirks in the val rules:
char
- Allows unescaped single quote
(value char '''), which is unambiguous in context but seems awkward to parse and confusing to read (especially if you're used to Python!).
- Rejects unescaped double-quote (
'"'), which is slightly annoying to me, personally. 馃檨
- floats
f32 is encoded as core:f64 which leaves rounding and overflow ambiguous, e.g. core:f64 accepts 1e99 which will overflow an f32.
f64canon rejects nan:0x but not -nan
- Handles in variants:
- Currently this would seem to be valid:
(value (option (future)) none), which is at least surprising if not actually wrong.
- Ints:
- Depending on how I squint it looks like
(value u64 -1) might be valid via core:i64 (wrapping to u64::MAX).
Separately: the bottom of the value definitions section describes value imports/exports but the import/export defs are missing matching rules. Nope, I was looking in the wrong place.
In looking at WAVE mapping to value defs (ref #639 (comment)) I found some quirks in the
valrules:char(value char '''), which is unambiguous in context but seems awkward to parse and confusing to read (especially if you're used to Python!).'"'), which is slightly annoying to me, personally. 馃檨f32is encoded ascore:f64which leaves rounding and overflow ambiguous, e.g.core:f64accepts1e99which will overflow anf32.f64canonrejectsnan:0xbut not-nan(value (option (future)) none), which is at least surprising if not actually wrong.(value u64 -1)might be valid viacore:i64(wrapping tou64::MAX).Separately: the bottom of the value definitions section describes value imports/exports but theNope, I was looking in the wrong place.import/exportdefs are missing matching rules.