Re: [heycam/webidl] Numeric type reform strawperson (#33)

GweenT
Syntax12844
statewacker
SumacHibiscus
Grath


    <p>When <code data-x="dom-setValidity">setValidity()</code> method sets
    <code data-x="">patternMismatch</code> flag to true for a
    <span>form-associated custom element</span>.</p>


???

I was reminded of this old proposal of mine. I think the OP is overambitious and naive, not to mention very long, both in proposal length and in what it makes Web IDL users type. These days I might go for something like

- `number` (today's `unrestricted double`)
- `fnumber`  (today's `double`)
- `int`, or maybe `int53` (today's `long long`)
- `uint`, or maybe `uint53` (today's `unsigned long long`)
- Add `[Mod=x]`.
  - Unsure if `x` should be `16` or `32768`. Maybe `[Modp]` or something for powers of 2.
  - Unsure if we should add `int32` as an alias for `[Modp=32] int` or just tell people to use the ugly-ish extended attribute if they insist on not using `int`. Maybe `int32` is a special-enough case that we want an alias, but we make people write out `[Modp=16] int` instead of giving them `short`.
- Keep `[EnforceRange]` and `[Clamp]` functionality, somehow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/33#issuecomment-468076275

Received on Wednesday, 27 February 2019 23:44:20 UTC