3 ms·
Static type inference is "fully typed". def getDate = "no date" That defines a method `getDate` with the type `() => String` in Scala. The type is statical
by still_grokking 4y ago
Static type inference is "fully typed".
def getDate = "no date"
That defines a method `getDate` with the type `() => String` in Scala.
The type is statically know, of course.
But it's recommended to use explicit return types for public methods. This helps preventing breaking public API by refactoring the implementation of a method.