Note that C++ also can do this, so I'm not sure the & is accomplishing the correct goal:void foo(Klass&); int main() { Klass *k = NULL; foo(*k); }
In C++, it is clear that the _caller_ is doing the dereferencing, and the dereference is also explicit.
However, the in contract does actually enforce the requirement.
And adds null pointer checks even when clearly not needed. - Johan