Hiding class pointers -- was it a good idea?

eao197 eao197 at intervale.ru
Fri Aug 17 09:05:47 PDT 2007


On Fri, 17 Aug 2007 18:58:19 +0400, Jb <jb at nowhere.com> wrote:

>
> "eao197" <eao197 at intervale.ru> wrote in message
> news:op.tw6uouycsdcfd2 at eao197nb2.intervale.ru...
> On Thu, 16 Aug 2007 22:36:53 +0400, Walter Bright
> <newshound1 at digitalmars.com> wrote:
>> But let to return to your goal: "Defining a problem out of existence is
>> preferable, cheaper, and more reliable than depending on convention or
>> more training." How about eluminating such problem as null pointers (I
>> think it is much more common and dangerous problem than object slicing).
>
> Because null pointers are easy to debug. And it's a lot less dangerous
> because you get an exception generated when you try to use a null  
> pointer.

It is, probably, a good consolidation when null-pointer error happens in  
production code.

> Where as with the slicing problem anything can happen and it's incredibly
> hard to debug.

Any examples? What's bad and dangerous happens in the case of slicing?

-- 
Regards,
Yauheni Akhotnikau



More information about the Digitalmars-d mailing list