Github user jaceklaskowski commented on a diff in the pull request:

    https://github.com/apache/spark/pull/830#discussion_r12870111
  
    --- Diff: docs/streaming-programming-guide.md ---
    @@ -83,21 +82,21 @@ import org.apache.spark.streaming.api._
     val ssc = new StreamingContext("local", "NetworkWordCount", Seconds(1))
     {% endhighlight %}
     
    -Using this context, we then create a new DStream
    -by specifying the IP address and port of the data server.
    +Using this context, we can create a DStream that represents streaming data 
from TCP 
    +source hostname (`localhost`) and port (`9999`).
     
     {% highlight scala %}
     // Create a DStream that will connect to serverIP:serverPort, like 
localhost:9999
    -val lines = ssc.socketTextStream("localhost", 9999)
    +import org.apache.spark.streaming.dstream._
    +val lines: DStream[String] = ssc.socketTextStream("localhost", 9999)
    --- End diff --
    
    I fully agree and I do follow the rule while developing Scala applications, 
but since Scala is a statically typed language knowing the type while reading 
the docs helps comprehending what types are in play. That was the only reason 
to include them to let users open the scaladoc and search for more information 
with the types explicitly described.
    
    I myself was wondering what types should I be reading about and although I 
had started with `ssc` and followed along, I found it a bit troublesome for 
newcomers to Spark and Scala. *The easier the better* was the idea behind the 
change.
    
    In Spark's [Quick 
Start](http://spark.apache.org/docs/latest/quick-start.html) it's quite 
different where the types are presented with the results.
    
    In either case, I needed types while reading along without access to 
Spark's shell/REPL.
    
    Would you agree with the reasoning?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to