Skip to content

Commit

Permalink
Remove pairs
Browse files Browse the repository at this point in the history
Overall this syntax was somewhat confusing as the slash is used for many other purposes.

Fetch was using this syntax, but that is being addressed in whatwg/fetch#1339.

Fixes #127.
  • Loading branch information
annevk committed Oct 25, 2021
1 parent 5ccbe0d commit 38ac4e1
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions infra.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1581,8 +1581,8 @@ a <a>map</a> |map|, with a less than algorithm |lessThanAlgo|, is to create a ne
<h3 id=structs>Structs</h3>

<p>A <dfn export>struct</dfn> is a specification type consisting of a finite set of
<dfn export for=struct,tuple,pair lt=item>items</dfn>, each of which has a unique and immutable
<dfn export for=struct,tuple,pair>name</dfn>.
<dfn export for=struct,tuple lt=item>items</dfn>, each of which has a unique and immutable
<dfn export for=struct,tuple>name</dfn>.


<h4 id=tuples>Tuples</h4>
Expand Down Expand Up @@ -1615,15 +1615,6 @@ to the <a>tuple</a>. An indexing syntax can be used by providing a zero-based in
Infra Standard might need the flexibility to add new <a for=struct>names</a> to their struct
without breaking literal syntax used by their dependencies. In that case a tuple is not appropriate.

<hr>

<p><a>Tuples</a> with two <a for=tuple>items</a> are also known as <dfn export lt=pair>pairs</dfn>.
For <a>pairs</a>, a slightly shorter literal syntax can be used, separating the two
<a for=pair>items</a> with a / character.

<p class=example id=example-pair>Another way of expressing our |statusInstance| tuple above would be
as 200/`<code>OK</code>`.


<h2 id=json>JSON</h2>

Expand Down

0 comments on commit 38ac4e1

Please sign in to comment.