Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Javap works, but you are pointing it to <code>scala.Predef.List</code>, which is a <code>type</code>, not a <code>class</code>. Point it instead to <code>scala.collection.immutable.List</code>.</p> <p>Now, for the most part just entering a value and seeing what the result's type is is enough. Using <code>:type</code> can be helpful sometimes. I find that use <code>getClass</code> is a really bad way of going about it, though.</p> <p>Also, you are sometimes mixing types and values. For example, here you refer to the object <code>::</code>:</p> <pre><code>scala&gt; `::`.getClass res79: java.lang.Class[_ &lt;: object scala.collection.immutable.::] = class scala.collection.immutable.$colon$colon$ </code></pre> <p>And here you refer to the class <code>::</code>:</p> <pre><code>scala&gt; classOf[`::`[Int]] res81: java.lang.Class[::[Int]] = class scala.collection.immutable.$colon$colon </code></pre> <p>Objects and classes are not the same thing, and, in fact, there's a common pattern of objects and classes by the same name, with a specific name for their relationship: companions.</p> <p>Instead of <code>dir</code>, just use tab completion:</p> <pre><code>scala&gt; "abc". + asInstanceOf charAt codePointAt codePointBefore codePointCount compareTo compareToIgnoreCase concat contains contentEquals endsWith equalsIgnoreCase getBytes getChars indexOf intern isEmpty isInstanceOf lastIndexOf length matches offsetByCodePoints regionMatches replace replaceAll replaceFirst split startsWith subSequence substring toCharArray toLowerCase toString toUpperCase trim scala&gt; "abc".compareTo compareTo compareToIgnoreCase scala&gt; "abc".compareTo def compareTo(String): Int </code></pre> <p>If you enter the power mode, you'll get way more information, but that's hardly for beginners. The above shows types, methods, and method signatures. Javap will decompile stuff, though that requires you to have a good handle on bytecode.</p> <p>There's other stuff in there -- be sure to look up <code>:help</code>, and see what's available.</p> <p>Docs are only available through the scaladoc API. Keep it open on the browser, and use its <em>search</em> capability to quickly find classes and methods. Also, note that, as opposed to Java, you don't need to navigate through the inheritance list to get the description of the method.</p> <p>And they do search perfectly fine for symbols. I suspect you haven't spent much time on scaladoc because other doc tools out there just aren't up to it. Javadoc comes to mind -- it's awful browsing through packages and classes.</p> <p>If you have specific questions Stack Overflow style, use <a href="http://symbolhound.com/">Symbol Hound</a> to search with symbols.</p> <p>Use the <a href="http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/index.html">nightly</a> Scaladocs: they'll diverge from whatever version you are using, but they'll always be the most complete. Besides, right now they are far better in many respects: you can use TAB to alternate between frames, with auto-focus on the search boxes, you can use arrows to navigate on the left frame after filtering, and ENTER to have the selected element appear on the right frame. They have the list of implicit methods, and have class diagrams.</p> <p>I've made do with a far less powerful REPL, and a far poorer Scaladoc -- they do work, together. Granted, I skipped to trunk (now HEAD) just to get my hands on tab-completion.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload