1

Reading this post he speaks about "Methods Values" but right in the next paragraph he says that "A Method Type is a non-value type. That means there is no value". Isn't this contradictory? In Scala, does a method have a value or not?

I know that we can't assign a method to a variable (without turning it into a function by using _), isn't this enough to say that a method does not have a value?

Community
  • 1
  • 1
Pedro Gordo
  • 1,825
  • 3
  • 21
  • 45
  • 2
    Read that fully: at one point there's the "we do not use that terminology" part. SO, instead of having a concept, you have concepts and multiple words that map to them in overlapping and possibly conflicting ways... – Tassos Bassoukos Apr 16 '16 at 11:21

1 Answers1

2

If m is a method then the method value is m_ which is actually a function. So it has a function type . A method value has a function type. A method type is just the def statement without the body. It cannot be used anywhere! This is how i look at it.

Som Bhattacharyya
  • 3,972
  • 35
  • 54