Understanding of '_' (underscore) in Scala as a type variable -


in scala can use underscore type variable in function, instance.

  def fun[_, _]() = {     // ?   }    fun[int, string]() 

is useful in real life programming? how useful me?

is useful in real life programming?

no, isn't.

how useful me?

to confuse people. could theoretically use mark unused type parameter when e.g. overriding method, don't think i've ever seen this.


Comments