|
Duplicate :
|
|
|
Duplicate :
|
|
|
Duplicate :
|
|
|
Relates :
|
A DESCRIPTION OF THE REQUEST :
As java doesn't has references (only pointers), the most common errors I've seen so far is NullPointerException. So the suggestion is simple either to have reference types like "String& " or keyword notnull..
so I can write either:
public void doSomething(String& s) { }
or
public void doSomething(notnull String s){}
and be sure that nobody will pass me a null pointer. The first syntax is more regular and natural, while the second is more java like :)
JUSTIFICATION :
It will make code maintenance easier, and make NullPointerException really exceptional rather than regular.
###@###.### 2004-12-13 23:35:06 GMT
|