I'm coming from a long time Python background. I've always leaned heavily on the type
function in Python to spit out what kind of object I'm working with.
e.g.
In[0]: print type("Hello")
Out[0]: >>> string
In[0]: print type(1234)
Out[0]: >>> int
As I make my way into Scala
territory, there are times when I'm not entirely sure what kind of object I've ended up with. being able to lay down a quick print type(obj)
whenever I get a little lost would be a huge help.
e.g.
println(type(myObj)) /* Whatever the scala equivalent would be */
>>> myObj: List[String] = List(Hello there, World!)