This page is no longer maintained — Please continue to the home page at

Example Issue with Scala API Documentation and Scala Complexity

No replies
Joined: 2010-06-04,
User offline. Last seen 5 weeks 15 hours ago.
I was trying to figure out how to start up a process and capture and went to
etc., but I really could not fathom how to do what I wanted by reading the API docs. They are considerably more complex than similar javadoc, and there are no examples. Eventually after quite a bit of time trying the right phrases in Google search, and finding many dead-ends and inappropriate legacy stuff that was misleading, I found
and the solution was immediately obvious. A picture really is worth a thousand words! It would be ever so helpful if the example presented on this web page could be added as an example in the scaladoc for ProcessLogger.
val logger = ProcessLogger(
    (o: String) => println("out " + o),
    (e: String) => println("err " + e))
is significantly more helpful than
def err (s: ⇒ String): Unit

Will be called with each line read from the process error stream.

def out (s: ⇒ String): Unit

Will be called with each line read from the process output stream.

I am a casual user of Scala, and between the scaladoc and Google searching, and rereading "Programming in Scala" - it was significantly more work than trying to figure out the equivalent functionality in Java.

Having more good examples in the scaladoc would make learning and using Scala much more painless. I would update the scaladoc myself, if I knew how. Is it appropriate for me to enter solutions like this in JIRA?

Cheers, Eric

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland