change 'this' pointer for structs to reference type

BCS ao at pathlink.com
Mon Nov 3 17:35:50 PST 2008


Reply to Jarrett,

> On Sun, Nov 2, 2008 at 11:26 AM, Robert Fraser
> <fraserofthenight at gmail.com> wrote:
>> Ah, I see. But then what about the "no pointers in SafeD" thing...
>> does this mean SafeD will also lack the "in" operator?
>> 
> On-topic: I don't see any problem with changing struct 'this' to a
> reference type.  What happens to the "null this" check, though?
> 
> Somewhat off-topic: Here's a crazy idea - get rid of the bizarre 'in'
> operator altogether since what it does can be done better with a
> library function (or multiple functions for different behaviors).  Why
> do you need a pointer from 'in' anyway?  To avoid a double lookup,
> yes, but what do you use the 'in' operator for?  Most of the time I'm
> not using it to test if something's in the AA.  I'm using it to
> perform a non-exception-throwing lookup.
> 

without checking I'd say I as often as not do use the pointer from in.





More information about the Digitalmars-d mailing list