Brian Ingerson [mailto:ingy@...] wrote:
> I never was a fan of the boolean type. Especially the '+'/'-'
> implicits. seq_in_seq is nice for YAML symetry though IMO,
> even if it doesn't show up in my personal use cases. I'll
> cast a vote for dropping these boolean implicits. We'll have
> to wait for Oren to get back from his vacation.
I have returned from my vacation earlier than I expected (see below if
you want a good laugh at my expense). So...
Thanks, why, for catching this ambiguity. Note that the problem isn't
seq_in_seq, because now we allow flow scalars to start at the next line
even this becomes ambiguous:
Hence I agree with Brian. The only practical solution is to drop -/+ as
implicit Booleans. Changing the sequence enter indicator from '-' to
something else would also work, but isn't practical. In retrospect we
shouldn't have tried to push this special case into the spec. So let's
just take it out.
I do wish we had some nice short, universal (i.e., non-English)
implicits for Booleans... Looking at my keyboard I can't come up with
anything reasonable, though. I guess we are stuck with the English
words. Sigh. I do suggest, however, that we also allow y/n/Y/N, for
brevity (the use case I'm thinking of is people writing config files).
As for why's point:
> I also think the triple '-' seq-in-seq is too much like a doc
I agree with Rich Morin:
> I find stacked-up dashes to be much cleaner (read, less annoying)
> than the stair-step equivalent. I think this is more important
> than the (slight, IMHO) possibility that someone might confuse
> "- - -" with "---".
P.S. About my vacation...
As you may know I left on a two-week skiing vacation. I enrolled in a
ski course to improve my style (for the first week). There was a large
group of advanced students so the first day was somewhat of a "sorting
day", quite tiring, and I was happy by the end of the day to have
managed well. Tired and happy. Tired enough so when I got out of my gear
I managed to bump by foot on the bed frame. Ouch.
The next day that foot was painful, unless I was using a perfect ski
position (properly leaning forward). So I did even better (it is amazing
what instant feedback does for improving physical skills). This was a
good thing as we went cruising through the world cup slope and the black
slopes that follow it (highly recommended skiing area, BTW). However by
the end of the lesson (afternoon) my foot was giving me hell, perfect
ski position or no perfect ski position. So the instructor referred me
to a doctor nearby who would "give me a painkiller and get me back on
the slope for tomorrow".
The doctor, a nice fellow, took some X-rays of the afflicted area and
cheerfully informed me that:
- My little toe is broken in two places;
- I'm crazy to have skied this way;
- I'm not the craziest he's seen, since there was always the German guy
who skied for 3 hours on a broken shin bone (just below the kneecap);
- Nevertheless, second place is respectable, and he doesn't recommend
going for the record;
- He's going to put my foot in plaster for a month;
- This would impair my skiing ability somewhat for the duration, as can
Protests about the relative size and importance of a 5mm bone in a toe
one doesn't use anyway were to no avail. So I packed what was left of my
dignity (which wasn't much at that point) and hobbled back home on my
I'm now spending the rest of my "vacation" at home. I've saved the money
for the hotel, ski pass etc. (they were all very nice and refunded or
canceled the payments), so I've decided to shift it to takeaways, cabs
etc. for the duration instead, and just rot in home playing computer
games. Oh, and do some YAML work, too :-)
I figured the main good point about the above is that it would give a
good laugh to my friends. It did, after all, give one to the doctor, the
ski instructor, the hotel manager, and anyone else who heard about it,
so I don't see why everyone else should be denied the pleasure. Go right
ahead, then. Laugh.