On Fri, 17 Jan 2014 05:29:05 -0000, H. S. Teoh <hst...@quickfur.ath.cx> wrote:
Now, if we modify this sentinel to instead record the location of the
code that first initialized it (via __FILE__ and __LINE__ default
parameters perhaps), then we can set it up to print out this information
at a convenient juncture, so that the source of the uninitialized
reference can be determined. *Then* perhaps it will be a start of a
solution to this issue. (Though it still has limitations in the sense
that the problem can only be caught at runtime, whereas some cases of
null dereference preferably should be caught at compile-time.)

So.. if we had a base class for all objects which obtained the file and line when created by assignment (from init) and threw on any dereference (opDispatch) that would do it, right?

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to