From: Brian I. <in...@tt...> - 2002-08-01 16:43:13
|
On 01/08/02 13:02 +0300, Oren Ben-Kiki wrote: > Brian Ingerson [mailto:in...@tt...] wrote: > > > Although I still think !/str is a better choice. It is cleaner, more > > > consistent with the other shortcuts, the cost is just one > > character, it > > > looks pretty good, it is intuitive ("absolute path" > > starting from "the root" > > > type URI). Plus, the use of explicit core types is rather > > rate. Examine your > > > files - my bet is that this change would break none of them > > (test files > > > excluded :-) > > > > > > I won't - quite - insist on it, but please reconsider this. > > Brian, any > > > opinion about this (syntactical) issue? > > > > I think I need a tutorial. On irc perhaps. I'm a little lost here. > > It is all rather simple, once one ignores the tortured path we've taken and > just examines the end result. > > - YAML core types are defined under the 'tag:' scheme. > > - This is the recommended scheme for all type family URIs. > > - This is Clark's pet peeve; using 'tag:' we don't get newbies asking "what > should I get when I paste the type family to a browser" because he woldn't > be able to do so in the first place. I'm less convinced of this; I think it > would be "nice" to be able to do such a pasting and get a human-readable > HTML document saying "Welcome to <type-family>, _the_ type family for > serializing duck soup!". But I don't feel strongly about it, and if I > understand correctly, neither do you. So we are going with Clark's strong > feelings here. Right? > > - The general format of the 'tag:' scheme is tag:<domain>,<date>:<whatever>. > The meaning is "<whatever>" as defined by whoever owned <domain> at <date> > (this allows old domain owners to keep on defining <whatever>s after they > have given up ownership, and new domain owners to define their own > <whatever>s). Nothing stops a domain owner from using two separate dates as > long as he owned the domain at that times. The resulting URIs are > "different" - how exactly is up to the domain owner. > > - We'll provide shortcuts (instead of the current ones). The set Clark and I > agree on is: > > Generic URI (not a shortcut): > !<scheme>:<whatever> > => !<scheme>:<whatever> > (Bad) example: > http://www.w3.org/1999/xhtml > > Private URI. x-private is a ball > of mud, no uniqueness, etc.: > !!<whatever> > => !x-private:<whatever> > Example: > !!my-class > > Language-specific (2001-01-05 is the > date yaml.org was registered): > !<language>/<whatever> > => !tag:<language>.yaml.org,2001-01-05:<whatever> > Example: > !perl/$Foo::Bar > > Language-specific with a date (suppose > that the language is taken over by someone > and they want to issue a whole new set): > !<language,<date>/<whatever> > => !tag:<language>.yaml.org,<date>:<whatever> > Example: > !java,2010-08-25/java.lang.Integer > (assuming Microsoft takes over Java in 2010 > and changed Integer to be a fixed-point float :-) > > Core types with a date (again, assume the > above unlikely scenario): > !<date>/<whatever> > => !tag:core.yaml.org,<date>:<whatever> > Example: > !2010-08-25/str > (While at it, the W3C re-defined strings to use > the new "MicroCode" Unicode extensions to support > the 2^73 characters of the first Alien language :-) > > - The last two shortcuts are of dubious usefulness but are required to be > "complete" in terms of the functionality offered/required by the 'tag:' > scheme. > > - At any rate, given the above shortcuts, Clark and I disagree about the > form of the final, most "core" shortcut. I think that for consistency, we > should use: > > Core types, new way: > !/<whatever> > => !tag:core.yaml.org,2001-01-05:<whatever> > Example: > !/str > > Clark thinks we should stick with: > > Core types, old way. <whatever> isn't, > really; it must not contain ':' and '/' > (and maybe other things): > !<whatever> > => !tag:core.yaml.org,2001-01-05:<whatever> > Example: > !str > > So, the question is, do you have an opinion about all this, and in > particular about the last (syntactical) issue? Yes. I have an opinion. "This all sucks" :) Why are we so sold on the whole URI/URN format in the first place? We started with the rather simple Java reverse DNS style. We switched over to the http style URIs because we thought they would be useful in a web services type of way. We now find that we don't want to take on the extra complexity/issues of real URIs. We somehow sucker ourselves into thinking that sticking with a URI-based typing scheme is still part of the equation. --- Proposal: > Can we just use our current types, and simply drop the 'http://' part altogether, and not put anything at the end of a rainbow, and be done with it? ... The whole 'tag:' thing just smells so bad for our ultraclean language. We've been innovators at so many levels. How do we get tricked into dropping the ball for some RFC that only somewhat applies to our beautiful language? Food for thought. Cheers, Brian |