Mukesh kumar saini Mukesh kumar saini - 7 months ago 35
Scala Question

what are value members in scaladocs

I am trying to dig scala deeper but scaladocs is not straight as javadocs. While doing some mathematical operation I visited to scala.math here package.
I am not able to understand value member in the docs.please suggest some guide line to decipher scaladocs. It may be a silly question but as a newbie please suggest something.



Any kind of definition that you can put inside a class, you can also put at the top level of a package. If you have some helper method you'd like to be in scope for an entire package, go ahead and put it right at the top level of the package

To do so, put the definitions in a package object. Each package is allowed to have one package object.

So - the Scaladoc for scala.math package divides members of this package to Type Members (classes and objects, just like in Java) and Value Members (defs, vals and vars). You can see these members in the source code at scala/math/package.scala.