Lasse said:
Documentation is your answer, not syntax or compiler checks.
That is the traditional C/C++ way of thinking. C# has given up
that for most other things than exception checking.
Or to quote Anders Hejlsberg:
<quote>
Exactly. Frankly, they look really great up front, and there's nothing
wrong with the idea. I completely agree that checked exceptions are a
wonderful feature. It's just that particular implementations can be
problematic. By implementing checked exceptions the way it's done in
Java, for example, I think you just take one set of problems and trade
them for another set of problems. In the end it's not clear to me that
you actually make life any easier. You just make it different.
</quote>
<quote>
C# is basically silent on the checked exceptions issue. Once a better
solution is known—and trust me we continue to think about it—we can go
back and actually put something in place. I'm a strong believer that if
you don't have anything right to say, or anything that moves the art
forward, then you'd better just be completely silent and neutral, as
opposed to trying to lay out a framework.
</quote>
(
http://www.artima.com/intv/handcuffs.html)
He does not prefer docs over language enforcing. But he want to do it
the right way and prefer nothing over the wrong way.
Arne