How could an idiomatic design of Serializable/Cloneable/… look like in Scala?

后端 未结 3 1469
情歌与酒
情歌与酒 2021-02-08 08:55

I wonder how much different these funcionality would look like (and how different the implementation would be), if Scala wouldn\'t (have to) follow Java\'s java.io.Seriali

3条回答
  •  星月不相逢
    2021-02-08 09:07

    Or are marker interfaces still the right choice in Scala?

    Nope. They aren't even the right choice in Java. They should be annotations, not interfaces.

提交回复
热议问题