What is the difference between = and := in Scala?

后端 未结 4 1949
天涯浪人
天涯浪人 2020-12-24 00:41

What is the difference between = and := in Scala?

I have googled extensively for \"scala colon-equals\", but was unable to find anything de

4条回答
  •  庸人自扰
    2020-12-24 01:09

    = performs assignment. := is not defined in the standard library or the language specification. It's a name that is free for other libraries or your code to use, if you wish.

提交回复
热议问题