News for hackers. Stuff that matters.
Re:Scala: sharp and gets things cut by gohrt on Monday October 07, 2013 @01:51PM (#6509925)
The type of that value is the type returned by that function. If you want to see what that type is, look at the function. That's not as weird as it sounds. Consider:

   int x = foo(2);
What is x? OK, you know it is an "int", due to the redsundant declaration. But that's not useful to you the programmer.

   int foo(int n) { return n+1 }
Ok, foo is successor. But you have to look at the definition to remind yourself that. Why not put that in the declaration of x as well?

There are no comments on this comment yet.