# The tilda prefixed parameter in the Spec

**URL:** <https://es.discourse.group/t/the-tilda-prefixed-parameter-in-the-spec/1392>\
**Category:** Spec Reading\
**Created:** [July 8, 2022, 4:49pm UTC](https://es.discourse.group/t/the-tilda-prefixed-parameter-in-the-spec/1392 "2022-07-08T16:49:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noobsoftware](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@noobsoftware](https://es.discourse.group/u/noobsoftware)\
**Post date:** [July 8, 2022, 4:49pm UTC](https://es.discourse.group/t/the-tilda-prefixed-parameter-in-the-spec/1392/1 "2022-07-08T16:49:09Z")

</div>

From the spec:

and:

StatementList : ReturnStatement ExpressionStatement[~In]

is equivilant to:

StatementList : ReturnStatement ExpressionStatement

What is the point of the tilda prefixed parameter appended to non-terminals if there is no effect in the result?

---

<div class="post-metadata">

**Author:** ![jmdyck](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/jmdyck/32/796_2.png) [@jmdyck](https://es.discourse.group/u/jmdyck)\
**Post date:** [July 8, 2022, 8:30pm UTC](https://es.discourse.group/t/the-tilda-prefixed-parameter-in-the-spec/1392/2 "2022-07-08T20:30:28Z")

</div>

You have to understand that equivalence in conjunction with the expansion for the `+` prefix for grammatical parameters. E.g.,

```javascript
    `Foo[+In]` expands to `Foo_In`, and
    `Foo[~In]` expands to `Foo`.

```

What's important is that `[+In]` and `[~In]` have _different_ expansions. The particular expansions shown aren't that important; they're never used elsewhere in the spec. The syntax would be the same if the spec said:

```javascript
    `Foo[+In]` expands to `Foo_plusIn`, and
    `Foo[~In]` expands to `Foo_tildeIn`.

```

or

```javascript
    `Foo[+In]` expands to `Foo+In`, and
    `Foo[~In]` expands to `Foo~In`

```

(if we assume that the world of expanded nonterminals allows `+` and `~` in non-terminal names).

Personally, I think a more symmetric expansion (like the alternatives above) would be less weird for the reader.

---

<div class="post-metadata">

**Author:** ![noobsoftware](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@noobsoftware](https://es.discourse.group/u/noobsoftware)\
**Post date:** [July 8, 2022, 11:09pm UTC](https://es.discourse.group/t/the-tilda-prefixed-parameter-in-the-spec/1392/3 "2022-07-08T23:09:53Z")

</div>

Thanks for your reply. I understand what you are saying.
