PROPOSAL : Specify nullable argument (original) (raw)
Olivier Chorier lapsus63 at gmail.com
Tue Mar 17 13:25:25 PDT 2009
- Previous message: Proposal: Access to Generic Type Parameters at Compile-Time
- Next message: PROPOSAL : Specify nullable argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Example :
public void getListOfProducts(Company owner, !String facultativeName) { .... }
The '!' should prevent the developper that the argument is able to be null. Invoking getListOfProducts(null, "name") could throw a compilation error/warning.
Or maybe better :
public void getListOfProducts(!Company owner, String facultativeName) { .... }
Here, the '!' indicates a mandatory argument (not null).
However, I don't know if the '!' marker could be the most appropriate.
- Previous message: Proposal: Access to Generic Type Parameters at Compile-Time
- Next message: PROPOSAL : Specify nullable argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]