Brian Ingerson wrote:

Not quite. You also need to discriminate the *type* of the superposition:

Oh right. I was thinking that C<any> and friends were operations, not types.
Oops.

YAML type-URIs are made up of a type-family with an optional format:

    !domain.com/type#format

and:

    !int

is shorthand for:

    !yaml.org/int#dec

So I'm wondering if any|all|one|none can be formats of !super?
I guess so. But they're not really formats, so much as distinct types.


And if so, should there be a default format?
No.


    # !yaml.org/any
    letters: !any [a, b, c]
Good.

# !yaml.org/super#all
digits: !super#all
- 0
- 1
- 2
Bad.


# !perl.yaml.org/one (Perl specific types)
names: !perl/one [Brian, Ingy, Mr Inline] # (Yes, this dwims :)
Ugly. (And it would probably have to be !perl6/one)


    # !perl.yaml.org/super-none  (longer type name, no format)
    sane: !perl/super-none
      - Larry
      - Damian
      - Brian
    ...
Urk.


It might be more forward thinking to allow any|all|one|none into the
yaml.org type repository.
That's my view.

Danmian

Reply via email to