PROPOSAL : Specify nullable argument (original) (raw)

Olivier Chorier lapsus63 at gmail.com
Tue Mar 17 13:25:25 PDT 2009


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.



More information about the coin-dev mailing list