Difference between method and function in Scala

后端 未结 9 2040
温柔的废话
温柔的废话 2020-11-21 07:22

I read Scala Functions (part of Another tour of Scala). In that post he stated:

Methods and functions are not the same thing

9条回答
  •  借酒劲吻你
    2020-11-21 08:00

    Functions don't support parameter defaults. Methods do. Converting from a method to a function loses parameter defaults. (Scala 2.8.1)

提交回复
热议问题