summaryrefslogtreecommitdiff
path: root/docs/proposals/008-tuples.md
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-10-25 21:12:37 -0700
committerGitHub <noreply@github.com>2024-10-25 21:12:37 -0700
commita508b264eda4bc3c99ba1f44eab1dec6e5ce06c0 (patch)
tree717722aefcae6b2a5adbccfbcd8aece4ed81f0b7 /docs/proposals/008-tuples.md
parent49c691e86862d092cd389a02beb4003ee59a4417 (diff)
Swap the term StdLib with Core-Module or Standard-Module in documents (#5414)
This PR is limited to documents. All use of "Standard library" or "StdLib" are replaced with either "core module" or "standard modules", depending on the context.
Diffstat (limited to 'docs/proposals/008-tuples.md')
-rw-r--r--docs/proposals/008-tuples.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/proposals/008-tuples.md b/docs/proposals/008-tuples.md
index efbcb7d28..a052585d6 100644
--- a/docs/proposals/008-tuples.md
+++ b/docs/proposals/008-tuples.md
@@ -28,7 +28,7 @@ to interop more directly with other parts of the user application written in oth
Proposed Approach
-----------------
-With variadic generics support, we can now easily define a Tuple type in stdlib as:
+With variadic generics support, we can now easily define a Tuple type in the core module as:
```
__generic<each T>
__magic_type(TupleType)
@@ -43,7 +43,7 @@ This will allow users to instantiate tuple types from their code with `Tuple<T0,
### Constructing Tuple Values
-To make it easy to construct tuples, we will define a `makeTuple` function in stdlib as:
+To make it easy to construct tuples, we will define a `makeTuple` function in the core module as:
```
__intrinsic_op($(kIROp_MakeTuple))
Tuple<expand each T> makeTuple(expand each T values);
@@ -73,7 +73,7 @@ let v = t._1_0;
### Concatenation
-We can define tuple concatenation operation in stdlib as:
+We can define tuple concatenation operation in the core module as:
```
Tuple<expand each T, expand each U> concat<each T, each U>(Tuple<expand each T> first, Tuple<expand each U> second)
{
@@ -103,7 +103,7 @@ int foo<each T>()
### Operator Overloads
We should have builtin operator overloads for all comparison operators if every element type of a tuple conforms to `IComparable`.
-This can be supported by defining an overload for these operators in stdlib in the form of:
+This can be supported by defining an overload for these operators in the core module in the form of:
```
bool assign(inout bool r, bool v) { r = v; return v; }
@@ -137,4 +137,4 @@ Tuple<T, U> concat<each T, each U>(Tuple<T> t, each U values);
```
However, this could lead to surprising behavior when the user writes `concat(t0, t1, t2)` where t1 and t2 are also tuples.
Having this overload means the result would be `(t0_0, t0_1, ... t0_n, t1, t2)` where the user could be expecting `t1` and `t2`
-to be flattened into the resulting tuple. To avoid this surprising behavior, we decide to not include this overload in stdlib. \ No newline at end of file
+to be flattened into the resulting tuple. To avoid this surprising behavior, we decide to not include this overload in the core module.