I'm reading the Akka tutorial http://doc.akka.io/docs/akka/2.5.4/scala/guide/tutorial_3.html
There's a line of code final case object ReadTemperature
.
Usage of the final
modifier together with object
already discussed in SO here: What's the point of declaring an object as "final"? but I would like to know whether final
also brings some runtime cost or not.
As far as I understand final
is only relevant while compiling for overrides checks, but probably when translating to VM code there are some nuances. Would be great to hear opinions.