Java type annotations, multi-precision

Timon Gehr timon.gehr at gmx.ch
Sun Feb 9 11:28:19 PST 2014


On 02/09/2014 07:25 PM, Meta wrote:
> On Sunday, 9 February 2014 at 17:55:50 UTC, bearophile wrote:
>> Francesco Cattoglio:
>>
>>> Wow, they are totally coping! :P
>>
>> What's interesting is not just that Java has type annotations, but the
>> details of this feature. That article show many details.
>>
>> Bye,
>> bearophile
>
> I don't think he mentioned it in the first article, but are these
> annotations checked at runtime or compile time? For example, @NonNegative.

Java does not assign any interesting semantics to those annotations. 
They however can be used together with tools/compiler plugins. Eg. one 
could use tools that recognize @NonNegative in order to add runtime 
checks or apply static analysis, or some combination of the two.


More information about the Digitalmars-d mailing list