In Scala, is assignment operator “=” a method call?

后端 未结 3 1453
后悔当初
后悔当初 2020-11-28 15:18

As per Scala book, \"Programming In Scala\" -

Scala is an object-oriented language in pure form: every value is an object and every operation is a method call

3条回答
  •  离开以前
    2020-11-28 15:45

    Nope. Assignment operator (=) is a reserved word. Also the below are:

    _ : = => <- <: <% >: # @

    For a more comprehensive list refer § 1.1. Some more information regarding = is described in § 6.12.4.

    So yes it is not a method call.

提交回复
热议问题