Re: Confused about pep 318
Peter Hansen <peter@engcorp. com> writes:
[color=blue]
> And Java chose it based on what precedent?[/color]
It's own: It follows from their existing use in JavaDoc tags. Already,
some preprocessors (like one for DBC) used "custom" tags using this
syntax, though still inside JavaDoc comment blocks. Other extensions,
like Microsoft's J/Direct used for their deviating Java VM, also used
the syntax.
The new Java2SE 5.0 / JRE 1.5.0 annotations syntax puts them around
where their C# equivalent metadata mechanism is.
E.g. J2SE 5.0:
@ImplementsRequ irement("B2")
public void adjustPrices(Ar rayList<Price> prices) {
//...
}
C# 2.0 (for the generics):
[ImplementsRequi rement("B2")]
public void AdjustPrices(Ar rayList<Price> prices) {
// ...
}
Peter Hansen <peter@engcorp. com> writes:
[color=blue]
> And Java chose it based on what precedent?[/color]
It's own: It follows from their existing use in JavaDoc tags. Already,
some preprocessors (like one for DBC) used "custom" tags using this
syntax, though still inside JavaDoc comment blocks. Other extensions,
like Microsoft's J/Direct used for their deviating Java VM, also used
the syntax.
The new Java2SE 5.0 / JRE 1.5.0 annotations syntax puts them around
where their C# equivalent metadata mechanism is.
E.g. J2SE 5.0:
@ImplementsRequ irement("B2")
public void adjustPrices(Ar rayList<Price> prices) {
//...
}
C# 2.0 (for the generics):
[ImplementsRequi rement("B2")]
public void AdjustPrices(Ar rayList<Price> prices) {
// ...
}
Comment