On 17/04/04 16:15 +0300, Oren Ben-Kiki wrote:
> - As the !#/bin/foo example shows, treating non-YAML files as YAML doesn't
> always do what's expected; for example, script files get their lines joined
> to one big line (with the occasional line break where an empty line was
> used). It is impossible to reconstruct the original script from this.
Um, unix scripts don't start with a 'banghash' dude. Don't you mean
'#!/bin/foo' ?
> Note that both these objections only hold for plain scalars. Quoted or block
> scalars are denoted by indicators (" ' | >) and using them without a "---" is
> much less confusing. Perhaps we should only ban header-less *plain*
> scalars... Hmmm. This would remove the most common "mistaken identity" case -
> "!#/bin/foo" files - and would require an explicit annotation of README files
> as being plain or folded, preventing them being silently mangled. Not too
> bad...
>
> So, options:
>
> - No-way: Forbid all header-less top-level scalars (as today).
+1
You know, maybe we shouldn't even allow scalars at the top level. Who
the hell wants to serialize a scalar? It's pretty boring.
Just kidding, but... I see no reason to try to make things that are not
YAML seem like YAML. So I think that all top level scalars should have a
header.
Cheers, Brian
|