From: Neil W. <neilw@ActiveState.com> - 2002-06-17 19:51:06
|
Hi yamlers, Wow. What a weekend :) Let me come clean right away: this regexp /[-_A-Za-z0-9]/ was actually missing a ' ' because of a brain fart, not an epiphany. Only my subconcious can claim any credit for it. But after reading through the discussion it provoked, I'm beginning to like it. Oren Ben-Kiki [17/06/02 12:24 -0400]: > Let's compare your proposal with Nail's proposal (as today + remove ' ' from > the str regexp): > > > 1) Keep YAML tidy > > Tradeoff: your littering it with ! for dates etc. isn't tidy; Neil's forcing > one to quote 'foo bar' isn't, either. No advantage. Right, but quotes have an established meaning to people -- '!' doesn't. It may be ugly, but it is understandable. It passes the girlfriend test with flying colours. Laura had no idea what the difference between '! foo' and 'foo' was (because she hasn't read the spec). But she immediately grasped the difference between 'foo' and '"foo"'. She guessed (guessed!) that quotes were required when there was ambiguity. Of course, she doesn't know what ambiguities there are (because the hasn't read the spec). It's interesting to watch how "beginners" learn something new. They NEVER read the spec, they just dump some data and watch for patterns. This is how people will use YAML. The spec will be read only be the eager beavers on this list. > 2) Make YAML DWIM > > Tricky. I mean 2002-01-15 to be a date. Your proposal doesn't do that. On > the other hand, I mean 99 Foo road to be a string, and Neil's proposal > doesn't do that. Again, no advantage. Giggle. In my proposal, '99 Foo road' is a parse error. Assuming we only want to compare _working_ YAML under each proposal, '"99 Foo road"' _is_ a string, so it _does_ do what you want. But that's probably not what you wanted to show... > nine: > - ! `red > - ! `white What the hell are those? Is my head slanting? I prefer all of these: nine: - ! .red - ! $red - ! ~red - ! (red) - ! #red - ! @red - ! ?red - ! |red - ! +red - ! =red - ! %red - ! ^red Wow. We have a lot of metacharacters free. It's time to add more features, gentlemen! Later, Neil |