Java adds concurrency annotations
Benji Smith
dlanguage at benjismith.net
Thu Sep 11 15:22:18 PDT 2008
Walter Bright wrote:
> My reading of the article suggests that it is a compile time only thing.
> There's no mention of transitivity, but the description implies it isn't
> transitive.
It's not strictly compile-time. The annotations are retained as metadata
in the bytecode, so they could be used at runtime, but the main point of
retention is for static analysis of bytecodes.
The @Immutable annotation is definitely not transitive. Off the top fo
my head, the idea of transitive const seems to rely on "ownership" of
data. And since java deliberately eschews the idea of data ownership, I
doubt if it would be possible to implement transitive const.
Also, the @Immutble annotation only applies to data, and there doesn't
seem to be any annotation for @ThisMethodDoesntModifyItsArgs.
--benji
More information about the Digitalmars-d
mailing list