On Thu, Mar 07, 2002 at 04:36:19AM -0500, Oren Ben-Kiki wrote:
| Brian wrote:
| > I was half joking about this before, but now I'm very serious.
| > Proposal:
| > For headerless documents, it is up to the application to decide the
| > default header (tab behaviour) for the document.
| I think Clark has demonstrated why this is a bad thing.
Right. It's not the application's choice, it is the person
who fills out the configuration file. Default configuration
files should just use spaces to be the most compatible.
| So all we have to decide what the YAML-specified default is
| either "tabs not allowed' or #TAB:8 (I agree with Brian the
| syntax should be #TAB:N or #TAB:N:HARD). This
| is the only difference between YAC#21 and YAC#22.
If we have a default of #TAB:8, then I don't see the
point in having #TAB at all. IMHO, if tabs are not
forbidden then there is no point in having a directive
to specify non-default behavior... too confusing. The
goal is to get the user to have an error message like:
By default TABS are not allowed in YAML files
since they mean different things to different
editors. If you are certain that this file will
not be viewed, printed, edited by another editor
there are two tab-behavior directives available.
#TAB:N means that a tab will be replaced by 1..N
spaces to move to a column evenly divisible by N.
#TAB:N:HARD means that a tab will be replaced by
N spaces regardless of column. Most editors use
#TAB:8, but there are enough editors that don't
use this standard to cause problems, which is why
tab useage must be explicitly declared in YAML.
We recommend that you avoid tabs and configure
your editor to just use spaces, this gives the
greatest interoperability between systems.
It's a bit long-winded, but after they read it they
will at least understand the problem with TABS. I'll
go for either of the three options:
1. We use 8 column tabs and suffer the problems
when people load YAML into Visual Studio and
don't see the structure right.
2. We forbid tabs altogether, this is the simplest..
3. We forbid tabs unless there is a #TAB directive.
Options that I'm now convinced are unworkable:
1. We have a command line argument, or the
application determines which tab method to use.
2. We default to TAB:8, but include a directive to
specify other behavior. This is confusing.
3. Just banning the mixing of TABs and SPACEs. This
doesn't allow for cut'n'paste, also it runs against
vi's default behavior. Further, it's kinda arbitrary.
| My initial tendency is to go for the default being #TAB:8, simply because it
| is, when all is said and done, the "default" tab behavior in every "dumb"
| device/system such as Notepad, text viewers, printers, etc. It also makes it
| easier to use TASTY editors. I think YAC#22 is a bit too restrictive. That
| said, I can live with YAC#22.
I think YAC#22 is a bad idea. If we go #TAB:8 default, then
let's make this the _only_ tab policy it's too confusing otherwise.