@@ -2296,7 +2296,7 @@ assert (p._1 == "world");
2296
2296
@cindex Vector types
2297
2297
@cindex Array types , see @i {Vector types }
2298
2298
2299
- The vector type-constructor @code { vec } represents a homogeneous array of
2299
+ The vector type-constructor represents a homogeneous array of
2300
2300
values of a given type. A vector has a fixed size. The layer of a vector type
2301
2301
is to the layer of its member type, like any type that contains a single
2302
2302
member type.
@@ -2305,11 +2305,11 @@ Vectors can be sliced. A slice expression builds a new vector by copying a
2305
2305
contiguous range -- given by a pair of indices representing a half-open
2306
2306
interval -- out of the sliced vector.
2307
2307
2308
- An example of a @code { vec } type and its use:
2308
+ An example of a vector type and its use:
2309
2309
@example
2310
- let vec [int] v = vec( 7, 5, 3) ;
2310
+ let [int] v = [ 7, 5, 3] ;
2311
2311
let int i = v.(2);
2312
- let vec [int] v2 = v.(0,1); // Form a slice.
2312
+ let [int] v2 = v.(0,1); // Form a slice.
2313
2313
@end example
2314
2314
2315
2315
Vectors always @emph {allocate } a storage region sufficient to store the first
@@ -2318,8 +2318,8 @@ vector. This behaviour supports idiomatic in-place ``growth'' of a mutable
2318
2318
slot holding a vector:
2319
2319
2320
2320
@example
2321
- let mutable vec[int] v = vec( 1, 2, 3) ;
2322
- v += vec( 4, 5, 6) ;
2321
+ let mutable vec[int] v = [ 1, 2, 3] ;
2322
+ v += [ 4, 5, 6] ;
2323
2323
@end example
2324
2324
2325
2325
Normal vector concatenation causes the allocation of a fresh vector to hold
@@ -2451,7 +2451,7 @@ An example of a @code{chan} type:
2451
2451
@example
2452
2452
type chan[vec[str]] svc;
2453
2453
let svc c = get_chan();
2454
- let vec[str] v = vec( "hello", "world") ;
2454
+ let vec[str] v = [ "hello", "world"] ;
2455
2455
c <| v;
2456
2456
@end example
2457
2457
@@ -3346,7 +3346,7 @@ Executing a @code{cont} expression immediately terminates the current iteration
3346
3346
of the innermost loop enclosing it, returning control to the loop
3347
3347
@emph {head }. In the case of a @code {while } loop, the head is the conditional
3348
3348
expression controlling the loop. In the case of a @code {for } or @code {for
3349
- each } loop, the head is the iterator or vector-slice increment controlling the
3349
+ each } loop, the head is the iterator or vector-element increment controlling the
3350
3350
loop.
3351
3351
3352
3352
A @code {cont } expression is only permitted in the body of a loop.
@@ -3368,7 +3368,7 @@ run the loop over the slice.
3368
3368
3369
3369
Example of 4 for loops, all identical:
3370
3370
@example
3371
- let vec[foo] v = vec( a, b, c) ;
3371
+ let vec[foo] v = [ a, b, c] ;
3372
3372
3373
3373
for (foo e in v.(0, _vec.len(v))) @{
3374
3374
bar(e);
@@ -3718,17 +3718,12 @@ allocating and freeing boxed values.
3718
3718
@c * Ref.Run.Mem:: Runtime built-in type services.
3719
3719
@cindex Built-in types
3720
3720
3721
- The runtime provides C and Rust code to manage several built-in types:
3722
- @itemize
3723
- @item @code {vec }, the type of vectors.
3724
- @item @code {str }, the type of UTF-8 strings.
3725
- @item @code {big }, the type of arbitrary-precision integers.
3726
- @item @code {chan }, the type of communication channels.
3727
- @item @code {port }, the type of communication ports.
3728
- @item @code {task }, the type of tasks.
3729
- @end itemize
3730
- Support for other built-in types such as simple types, tuples,
3731
- records, and tags is open-coded by the Rust compiler.
3721
+ The runtime provides C and Rust code to assist with various built-in types,
3722
+ such as vectors, strings, bignums, and the low level communication system
3723
+ (ports, channels, tasks).
3724
+
3725
+ Support for other built-in types such as simple types, tuples, records, and
3726
+ tags is open-coded by the Rust compiler.
3732
3727
3733
3728
@node Ref.Run.Comm
3734
3729
@subsection Ref.Run.Comm
0 commit comments