From: Brian I. <in...@tt...> - 2002-10-31 01:56:24
|
I think it would behoove us to make yaml the first working serialization software in Perl6. Actually, I can't imagine people using anything else. Cheers, Brian ----- Forwarded message from Damian Conway <da...@co...> ----- From: Damian Conway <da...@co...> Date: Thu, 31 Oct 2002 09:57:12 +1100 To: "per...@pe..." <per...@pe...> Subject: Re: Persistance of superpositions? User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826 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 ----- End forwarded message ----- |