@@ -4,6 +4,9 @@ Language Differences
4
4
.. current-library :: dylan
5
5
.. current-module :: dylan
6
6
7
+ This document describes the ways in which Open Dylan differs from the
8
+ specification in the :drm: `Dylan Reference Manual <Title> `.
9
+
7
10
Note that in addition to the intentional differences documented below, there
8
11
are several `known bugs
9
12
<https://github.com/dylan-lang/opendylan/issues?q=is%3Aissue+is%3Aopen+label%3ADRM> `_
@@ -23,8 +26,7 @@ achieved by returning the argument *hash-state* unchanged as the result
23
26
protocol.
24
27
25
28
This section describes the items that have been changed. We also provide
26
- a Table-extensions module, which you can read about in
27
- :doc: `../collections/table-extensions `.
29
+ a :doc: `table-extensions module <../collections/table-extensions >`.
28
30
29
31
.. generic-function :: table-protocol
30
32
:open:
@@ -42,15 +44,15 @@ a Table-extensions module, which you can read about in
42
44
Returns the functions used to iterate over tables. These functions are
43
45
in turn used to implement the other collection operations on :drm: `<table> `.
44
46
45
- The *test-function * argument is for the table test function, which is
47
+ The *test-function * return value is for the table test function, which is
46
48
used to compare table keys. It returns true if, according to the table's
47
49
equivalence predicate, the keys are members of the same equivalence
48
50
class. Its signature must be::
49
51
50
52
test-function *key1* *key2* => *boolean*
51
53
52
- The *hash-function * argument is for the table hash function, which
53
- computes the hash code of a key. Its signature must be::
54
+ The *hash-function * return value must compute the hash code of a key. Its
55
+ signature must be::
54
56
55
57
hash-function *key* *initial-state* => *id* *result-state*
56
58
@@ -60,8 +62,8 @@ a Table-extensions module, which you can read about in
60
62
hash code is returned as two values: an integer *id * and a hash-state
61
63
*result-state *. This *result-state * is obtained by merging the
62
64
*initial-state * with the hash-state that results from hashing *key *.
63
- The *result-state * may or may not be == to *initial-state *. The
64
- *initial-state * could be modified by this operation.
65
+ The *result-state * may or may not be :drm: ` == ` to *initial-state *. The
66
+ *initial-state * may be modified by this operation.
65
67
66
68
.. function :: merge-hash-ids
67
69
@@ -81,20 +83,15 @@ a Table-extensions module, which you can read about in
81
83
generate a hash ID for an object by combining hash IDs of some of
82
84
its parts.
83
85
84
- The *id1 *, *id2 * arguments and the return value *merged-id * are all
85
- integers.
86
-
87
- The *ordered * argument is a boolean, and determines whether the
88
- algorithm used to the merge the IDs is permitted to be
89
- order-dependent. If false (the default), the merged result must be
90
- independent of the order in which the arguments are provided. If
91
- true, the order of the arguments matters because the algorithm used
92
- need not be either commutative or associative. It is best to
93
- provide a true value for *ordered * when possible, as this may
94
- result in a better distribution of hash IDs. However, *ordered *
95
- must only be true if that will not cause the hash function to
96
- violate the second constraint on hash functions, described on page
97
- :drm: `123 of the DRM <Tables#XREF-1049> `.
86
+ The *ordered * argument determines whether the algorithm used to merge the
87
+ IDs is permitted to be order-dependent. If false (the default), the merged
88
+ result must be independent of the order in which the arguments are
89
+ provided. If true, the order of the arguments matters because the
90
+ algorithm used need not be either commutative or associative. It is best
91
+ to provide a true value for *ordered * when possible, as this may result in
92
+ a better distribution of hash IDs. However, *ordered * must only be true if
93
+ that will not cause the hash function to violate the second constraint on
94
+ hash functions, :drm: `described in the DRM <Tables#XREF-1049> `.
98
95
99
96
.. function :: object-hash
100
97
0 commit comments