showell@... [mailto:showell@...] wrote:
> # 33.3% valid YAML of the future??
No need to get sarcastic. The following is invalid and nobody ever suggested
> Unindented scalar: |
> Indentation is the
> number of spaces. Period.
> # YAML as already implemented 3 times
A good point. But we are talking about a minor change, and we are at a "Last
Call" phase, not a "Frozen Spec" stage.
Note that state 1 at least is only a relaxation and all existing YAML files
would stay legal (I bet that state 2 also allows all actual YAML files in
use but in theory there are documents it would make illegal).
I guess this gives an extra weight to Brian's and Why's position (less of a
change in the parser, better compatibility with existing documents). Like I
said I'll go with that (assuming Clark goes with it as well).
> rant: >
> No amount of philosophizing is gonna convince me that a
> dash is part of indentation. If Guido can create an entire
> object-oriented programming language community around Python,
> which abides by the simple rule that indentation == number of
> spaces, then why can't we do the same for YAML?
That's code, not data, and there is a difference. Guido never used an
indentation syntax for data. If he had perhaps we wouldn't have needed YAML,
he's a pretty sharp guy :-) At any rate, all we can do is argue this on
I don't put much store in the philosophical description of "'-' being part
of the indentation". What matters to me is what is and what is not valid
YAML syntax. Given our goals (radability/writability), is there a compelling
argument not to allow:
I think there isn't. Assuming this is the only change we make compared to
the current state (state 1, as promoted by Why and Brian), the rest is just
a wording debate. You can think of it as a special case (seq-in-key) or as
counting the '-' as part of the indentation or whatever you want, that's
besides the point.
> showell@... [mailto:showell@...] wrote:
> > # 33.3% valid YAML of the future??
> No need to get sarcastic. The following is invalid and nobody ever suggested
> > Unindented scalar: |
> > Indentation is the
> > number of spaces. Period.
The sarcasm was purely unindented. ;)
This was the proposed 33.3% valid YAML:
- zero spaces
- but level ?? indentation
I could see, though, how you were confused into thinking the scalar was the unindented piece that I was referring to. After all, the map, sequence, and scalar were all equally unindented.
> I don't put much store in the philosophical description of "'-' being part
> of the indentation". What matters to me is what is and what is not valid
> YAML syntax. Given our goals (radability/writability), is there a compelling
> argument not to allow:
> - use
> - case
The reasons to allow it are about as compelling as the reasons not to allow it.
the tried and true YAML way:
- is easy to type for anybody with opposable thumbs
- looks pretty nice
- has been implemented successfully at least 3 times
- has the advantage of being restrictive--we can always loosen it later
- has never elicited complaints from outside the YAML core crew
the proposed new YAML way:
- saves typing
- looks great with two-space indentation
- creates a LOT of thought-provoking emails about wording ;)