Effectively final effective?

Zdenek Tronicek tronicek at fit.cvut.cz
Thu Feb 25 00:46:52 PST 2010


Alex Blewitt napsal(a):
> Secondly, the fact that Scala can mutate captured variables (whereas
> Java cannot, in the current version of the spec) is a key difference
> between the two approaches. SImply omitting the keyword in Java does
> not enable muation. So the question is not 'would you prefer them to
> be mutable' but rather 'given that it is final, would you prefer to
> explicitly declare that for less capable programmers to read later'.
> Programs are written for other humans to understand, not for a
> computer to understand.

Sure. We should prefer easy-to-read to easy-to-write. And this not only
from myself: listen to Barbara Liskov at
http://www.infoq.com/presentations/liskov-power-of-abstraction.
But I am in doubt here, if 'final' improves readability.

Z.
-- 
Zdenek Tronicek
FIT CTU in Prague



More information about the lambda-dev mailing list