PROPOSAL: String parameters compile time validation (early beta)

rssh at gradsoft.com.ua rssh at gradsoft.com.ua
Thu Mar 26 14:04:28 PDT 2009


 As I remember, this is part of JSR 305
http://jcp.org/en/jsr/detail?id=305

(In addition, this is library change, not a language change.)

> Strings represent most wide range of objects, while they are omitted
> with good validation at compile time (ide).
> As help I want propose, or at start ask for opinion about adding
> compile time validation to String parameters.
>
> poor sample:
>
> class Binary{
>      @RegExp("regExpName","regExp")
>      @RegExp("regExpName1","regExp")
>
>       void main(...){
>          String bites = @RegExp("regExpName") "....";
>          ...
>       }
>
>       int parseBites(@RegExp("regExpName") String bites){
>          ...
>       };
> }
>
> Validation by regexp-s would be only at compile time (efficiency).
>
> Target is quite clear, but anyone see any problems?
>
> --
> Pozdrowionka. / Regards.
> Lasu aka Marek Kozieе┌
>
> http://lasu2string.blogspot.com/
>
>





More information about the coin-dev mailing list