summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/Symbol.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/library/scala/Symbol.scala b/src/library/scala/Symbol.scala
index 92a4e838f0..2c951a4619 100644
--- a/src/library/scala/Symbol.scala
+++ b/src/library/scala/Symbol.scala
@@ -16,14 +16,18 @@ import scala.collection.jcl
private[scala] object internedSymbols extends jcl.WeakHashMap[Symbol, ref.WeakReference[Symbol]]
/** <p>
- * Instances of <code>Symbol</code> can be created easily with
- * Scala's built-in quote mechanism.
+ * This class provides a simple way to get unique objects for
+ * equal strings. By default, symbols use string equality for
+ * equality testing, but interned symbols can be compared using
+ * reference equality for the same effect. Instances of
+ * <code>Symbol</code> can be created easily with Scala's built-in
+* quote mechanism.
* </p>
* <p>
* For instance, the <a href="http://scala-lang.org/" target="_top">Scala</a>
* term <code>'mysym</code> will invoke the constructor of the
* <code>Symbol</code> class in the following way:
- * <code>new Symbol("mysym")</code>.
+ * <code>new Symbol("mysym").intern</code>.
* </p>
*
* @author Martin Odersky