Hi Fabien,

I think the problem you mention about developers struggling with YAML syntax
also exists with plain PHP, and XML as well. Can you spot the syntax error
in these samples? We can, but it takes young developers several minutes:

<?php if ($condition): ?>
  <p>This is good</p>
<?php else ?>
  <p>This is not good<p>
<?php endif; ?>

<table name="book">
  <column name="id" type="integer" autoIncrement="true" primaryKey="true">
  <column name="title" />
</table>

Young developers often struggle a lot with syntax alone, but learning syntax
is the first step before learning grammar. YAML is not harder to learn than
PHP, and I agree with earlier remarks about readability, especially for long
configuration files. I also agree that the documentation is better when it's
more concise - and YAML offers that.

Lastly, if syntax and grammar are still strong points against YAML, it's not
impossible to improve the error messages in the parsing (to help with
syntax), or to validate a YAML file against a schema (to help with grammar).

In conclusion: YAML for default.

My two cents,

François

2010/9/25 Fabien Potencier <[email protected]>

> On 9/24/10 10:13 PM, Brandon Turner wrote:
>
>>  I tend to agree with Jon here.  Fabien, can you explain why the need
>> for a YAML parser is a show-stopper for YAML being the default?
>>
>
> I've done many symfony workshops. And here is what I see during these
> workshops:
>
> * People do NOT have any IDE (so many people just use Notepad !) -- so XML
> is probably not an option for them;
>
> * But YAML is HARD to get right.
>
> Here is a YAML file:
>
> foo:
>  bar: foobar
>
> bar
>  foo: barfoo
>
> Can you spot the problem here? I can because I know where to look for. But
> people can get stuck on this one for HOURS; even if there is an error
> message saying: "Unable to parse line 4 (bar).". And after 2-3 more problems
> like this one with YAML, they will just hate symfony. And that's only if
> they understand that the problem is in the YAML configuration file.
>
> So, YAML being the default is nice if everything goes fine BUT as soon as
> you make a typo, you are going to loose people pretty fast.
>
> Of course, the documentation can explain the common problems with YAML
> (that's what we have in the current symfony documentation); but frankly,
> people do not read documentation and even if they do, they won't remember to
> check the troubleshooting section when they have a problem. Why? Because
> they won't even understand that the problem is in the YAML file.
>
> To sum up, I'm against YAML because of my experience as a symfony trainer.
>
> Fabien
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-devs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to