From b66e75c285cba469c5225f3394da149456d17d16 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 3 Feb 2014 10:27:39 +0100 Subject: Deprecate pre-defined built-in types The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added. --- lib/stdlib/doc/src/array.xml | 16 +++++--- lib/stdlib/doc/src/dict.xml | 10 ++++- lib/stdlib/doc/src/digraph.xml | 4 +- lib/stdlib/doc/src/gb_sets.xml | 90 +++++++++++++++++++++++------------------ lib/stdlib/doc/src/gb_trees.xml | 46 +++++++++++++-------- lib/stdlib/doc/src/queue.xml | 10 ++++- lib/stdlib/doc/src/sets.xml | 10 ++++- 7 files changed, 117 insertions(+), 69 deletions(-) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/array.xml b/lib/stdlib/doc/src/array.xml index b0b3aa6dc1..b03a2fa0cc 100644 --- a/lib/stdlib/doc/src/array.xml +++ b/lib/stdlib/doc/src/array.xml @@ -3,7 +3,7 @@
- 20072013 + 20072014 Ericsson AB. All Rights Reserved. @@ -84,13 +84,19 @@ the default value cannot be confused with the values of set entries.

{'EXIT',{badarg,_}} = (catch array:get(18, A3)). - array() +

A functional, extendible array. The representation is not documented and is subject to change without notice. Note that arrays cannot be directly compared for equality.

+ + + +

array() is equivalent to array(term()).

+
+
@@ -189,7 +195,7 @@ the default value cannot be confused with the values of set entries.

-

Convert an ordered list of pairs {Index, Value} to a +

Convert an ordered list of pairs {Index, Value} to a corresponding extendible array. Default is used as the value for uninitialized entries of the array. If Orddict is not a proper, ordered list of pairs whose first elements are nonnegative @@ -455,7 +461,7 @@ cannot be changed once the array has been created.

-

Convert the array to an ordered list of pairs {Index, Value}, +

Convert the array to an ordered list of pairs {Index, Value}, skipping default-valued entries.

See also: to_orddict/1.

@@ -476,7 +482,7 @@ cannot be changed once the array has been created.

-

Convert the array to an ordered list of pairs {Index, Value}. +

Convert the array to an ordered list of pairs {Index, Value}.

See also: from_orddict/2, sparse_to_orddict/1.

diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml index 6ff81b56ee..942fd1f45e 100644 --- a/lib/stdlib/doc/src/dict.xml +++ b/lib/stdlib/doc/src/dict.xml @@ -4,7 +4,7 @@
- 19962013 + 19962014 Ericsson AB. All Rights Reserved. @@ -41,9 +41,15 @@ - dict() +

Dictionary as returned by new/0.

+ + + +

dict() is equivalent to dict(term(), term()).

+
+
diff --git a/lib/stdlib/doc/src/digraph.xml b/lib/stdlib/doc/src/digraph.xml index c5d5707f4f..9b9b48584b 100644 --- a/lib/stdlib/doc/src/digraph.xml +++ b/lib/stdlib/doc/src/digraph.xml @@ -4,7 +4,7 @@
- 19962013 + 19962014 Ericsson AB. All Rights Reserved. @@ -98,7 +98,7 @@ - digraph() +

A digraph as returned by new/0,1.

diff --git a/lib/stdlib/doc/src/gb_sets.xml b/lib/stdlib/doc/src/gb_sets.xml index 8ca95df8fc..ea96c14472 100644 --- a/lib/stdlib/doc/src/gb_sets.xml +++ b/lib/stdlib/doc/src/gb_sets.xml @@ -4,7 +4,7 @@
- 20012013 + 20012014 Ericsson AB. All Rights Reserved. @@ -115,28 +115,40 @@ - gb_set() +

A GB set.

- + + +

set() is equivalent to set(term()).

+
+
+ +

A GB set iterator.

+ + + +

iter() is equivalent to iter(term()).

+
+
- Add a (possibly existing) element to a gb_set + Add a (possibly existing) element to a set -

Returns a new gb_set formed from Set1 with +

Returns a new set formed from Set1 with Element inserted. If Element is already an element in Set1, nothing is changed.

- Rebalance tree representation of a gb_set + Rebalance tree representation of a set

Rebalances the tree representation of Set1. Note that this is rarely necessary, but may be motivated when a large @@ -148,9 +160,9 @@ - Remove an element from a gb_set + Remove an element from a set -

Returns a new gb_set formed from Set1 with +

Returns a new set formed from Set1 with Element removed. Assumes that Element is present in Set1.

@@ -158,9 +170,9 @@ - Remove a (possibly non-existing) element from a gb_set + Remove a (possibly non-existing) element from a set -

Returns a new gb_set formed from Set1 with +

Returns a new set formed from Set1 with Element removed. If Element is not an element in Set1, nothing is changed.

@@ -168,7 +180,7 @@ - Return the difference of two gb_sets + Return the difference of two sets

Returns only the elements of Set1 which are not also elements of Set2.

@@ -177,14 +189,14 @@ - Return an empty gb_set + Return an empty set -

Returns a new empty gb_set.

+

Returns a new empty set.

- Filter gb_set elements + Filter set elements

Filters elements in Set1 using predicate function Pred.

@@ -192,7 +204,7 @@
- Fold over gb_set elements + Fold over set elements

Folds Function over every element in Set returning the final value of the accumulator.

@@ -200,46 +212,46 @@
- Convert a list into a gb_set + Convert a list into a set -

Returns a gb_set of the elements in List, where +

Returns a set of the elements in List, where List may be unordered and contain duplicates.

- Make a gb_set from an ordset list + Make a set from an ordset list -

Turns an ordered-set list List into a gb_set. The list +

Turns an ordered-set list List into a set. The list must not contain duplicates.

- Add a new element to a gb_set + Add a new element to a set -

Returns a new gb_set formed from Set1 with +

Returns a new set formed from Set1 with Element inserted. Assumes that Element is not present in Set1.

- Return the intersection of two gb_sets + Return the intersection of two sets

Returns the intersection of Set1 and Set2.

- Return the intersection of a list of gb_sets + Return the intersection of a list of sets -

Returns the intersection of the non-empty list of gb_sets.

+

Returns the intersection of the non-empty list of sets.

- Check whether two gb_sets are disjoint + Check whether two sets are disjoint

Returns true if Set1 and Set2 are disjoint (have no elements in common), @@ -248,7 +260,7 @@ - Test for empty gb_set + Test for empty set

Returns true if Set is an empty set, and false otherwise.

@@ -257,7 +269,7 @@ - Test for membership of a gb_set + Test for membership of a set

Returns true if Element is an element of Set, otherwise false.

@@ -265,9 +277,9 @@
- Test for a gb_set + Test for a set -

Returns true if Term appears to be a gb_set, +

Returns true if Term appears to be a set, otherwise false.

@@ -281,7 +293,7 @@
- Return an iterator for a gb_set + Return an iterator for a set

Returns an iterator that can be used for traversing the entries of Set; see next/1. The implementation @@ -303,7 +315,7 @@ - Traverse a gb_set with an iterator + Traverse a set with an iterator

Returns {Element, Iter2} where Element is the smallest element referred to by the iterator Iter1, @@ -314,14 +326,14 @@ - Return a gb_set with one element + Return a set with one element -

Returns a gb_set containing only the element Element.

+

Returns a set containing only the element Element.

- Return the number of elements in a gb_set + Return the number of elements in a set

Returns the number of elements in Set.

@@ -356,24 +368,24 @@
- Convert a gb_set into a list + Convert a set into a list

Returns the elements of Set as a list.

- Return the union of two gb_sets + Return the union of two sets -

Returns the merged (union) gb_set of Set1 and +

Returns the merged (union) set of Set1 and Set2.

- Return the union of a list of gb_sets + Return the union of a list of sets -

Returns the merged (union) gb_set of the list of gb_sets.

+

Returns the merged (union) set of the list of sets.

diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml index 57e60eacb7..b2f237e1d7 100644 --- a/lib/stdlib/doc/src/gb_trees.xml +++ b/lib/stdlib/doc/src/gb_trees.xml @@ -4,7 +4,7 @@
- 20012013 + 20012014 Ericsson AB. All Rights Reserved. @@ -59,13 +59,25 @@ - gb_tree() +

A GB tree.

- + + +

tree() is equivalent to tree(term(), term()).

+
+
+ +

A GB tree iterator.

+ + + +

iter() is equivalent to iter(term(), term()).

+
+
@@ -108,9 +120,9 @@ Insert or update key with value in a tree -

Inserts Key with value Val into Tree1 if +

Inserts Key with value Value into Tree1 if the key is not present in the tree, otherwise updates - Key to value Val in Tree1. Returns the + Key to value Value in Tree1. Returns the new tree.

@@ -135,7 +147,7 @@ Insert a new key and value in a tree -

Inserts Key with value Val into Tree1; +

Inserts Key with value Value into Tree1; returns the new tree. Assumes that the key is not present in the tree, crashes otherwise.

@@ -181,8 +193,8 @@ Return largest key and value -

Returns {Key, Val}, where Key is the largest - key in Tree, and Val is the value associated +

Returns {Key, Value}, where Key is the largest + key in Tree, and Value is the value associated with this key. Assumes that the tree is nonempty.

@@ -191,7 +203,7 @@ Look up a key in a tree

Looks up Key in Tree; returns - {value, Val}, or none if Key is not + {value, Value}, or none if Key is not present.

@@ -207,7 +219,7 @@ Traverse a tree with an iterator -

Returns {Key, Val, Iter2} where Key is the +

Returns {Key, Value, Iter2} where Key is the smallest key referred to by the iterator Iter1, and Iter2 is the new iterator to be used for traversing the remaining nodes, or the atom none if no @@ -225,8 +237,8 @@ Return smallest key and value -

Returns {Key, Val}, where Key is the smallest - key in Tree, and Val is the value associated +

Returns {Key, Value}, where Key is the smallest + key in Tree, and Value is the value associated with this key. Assumes that the tree is nonempty.

@@ -234,8 +246,8 @@ Extract largest key and value -

Returns {Key, Val, Tree2}, where Key is the - largest key in Tree1, Val is the value +

Returns {Key, Value, Tree2}, where Key is the + largest key in Tree1, Value is the value associated with this key, and Tree2 is this tree with the corresponding node deleted. Assumes that the tree is nonempty.

@@ -245,8 +257,8 @@ Extract smallest key and value -

Returns {Key, Val, Tree2}, where Key is the - smallest key in Tree1, Val is the value +

Returns {Key, Value, Tree2}, where Key is the + smallest key in Tree1, Value is the value associated with this key, and Tree2 is this tree with the corresponding node deleted. Assumes that the tree is nonempty.

@@ -263,7 +275,7 @@ Update a key to new value in a tree -

Updates Key to value Val in Tree1; +

Updates Key to value Value in Tree1; returns the new tree. Assumes that the key is present in the tree.

diff --git a/lib/stdlib/doc/src/queue.xml b/lib/stdlib/doc/src/queue.xml index bcf063bf0f..9c994154d4 100644 --- a/lib/stdlib/doc/src/queue.xml +++ b/lib/stdlib/doc/src/queue.xml @@ -4,7 +4,7 @@
- 19962013 + 19962014 Ericsson AB. All Rights Reserved. @@ -90,9 +90,15 @@ - queue() +

As returned by new/0.

+ + + +

queue() is equivalent to queue(term()).

+
+
diff --git a/lib/stdlib/doc/src/sets.xml b/lib/stdlib/doc/src/sets.xml index 4b220bdd85..c5b8dce4b7 100644 --- a/lib/stdlib/doc/src/sets.xml +++ b/lib/stdlib/doc/src/sets.xml @@ -4,7 +4,7 @@
- 20002013 + 20002014 Ericsson AB. All Rights Reserved. @@ -45,9 +45,15 @@ - set() +

As returned by new/0.

+ + + +

set() is equivalent to set(term()).

+
+
-- cgit v1.2.3