# Grammar liberalizations

**URL:** <https://internals.rust-lang.org/t/grammar-liberalizations/7170>\
**Category:** Uncategorized\
**Created:** [March 28, 2018, 6:56pm UTC](https://internals.rust-lang.org/t/grammar-liberalizations/7170 "2018-03-28T18:56:39Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![scottmcm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/scottmcm/32/2355_2.png) [@scottmcm](https://internals.rust-lang.org/u/scottmcm)\
**Post date:** [March 29, 2018, 2:45am UTC](https://internals.rust-lang.org/t/grammar-liberalizations/7170/6 "2018-03-29T02:45:15Z")

</div>

> [@Centril](#):
>
> Instead, it is a philosophy in Rust language design to have a flexible grammar that accepts things that people find abhorrent.

Is this true? The liberalizations I've seen (trailing comma in calls, leading vert in arms, trailing + in bounds, ...) all seem to be aiming for a different philosophy: All items in a sequence can be written the same way, if you so wish, with no need to do something different a particular position. Thus `foo(a, b,)`, `T: A+ B+`, `|A |B =>`, ...

That serves both the code generators wanting to just do the same transformation for each item as well as the [rustfmt principle](https://github.com/rust-lang-nursery/fmt-rfcs/blob/master/guide/principles.md) to prefer formats that result in minimal diffs in source control.

That's very different from supporting different formats because people have different tastes.

---

_[View the full topic](https://internals.rust-lang.org/t/grammar-liberalizations/7170)._
