opStar

Sean Kelly sean at f4.ca
Mon Nov 12 12:07:00 PST 2007


Walter Bright wrote:
> Bill Baxter wrote:
>> If you're not going to be able to access members and such via the 
>> opStar, why not just have iterators use a convention like p.val to 
>> access the value pointed too, rather than *p.  Why does it need to be 
>> an operator?
> 
> Because raw pointers don't have a .value property, and can't because 
> then you'd have problems with pointers to structs that have a value member.

Sure.  But how much value is there in supporting pointers as iterators? 
  Even the C++ community has moved away from this idea, although the 
syntax still supports it.


Sean



More information about the Digitalmars-d mailing list