How do you overload opEquals?

Adam D. Ruppe destructionator at gmail.com
Tue Nov 19 13:33:30 PST 2013


On Tuesday, 19 November 2013 at 21:25:47 UTC, Dale Matthews wrote:
> Adam, do you recommend using a struct instead of a class?

Yes, I would use a struct instead of a class here. The key 
question to ask in D is: do you need inheritance? If yes, use a 
class, if no, struct is usually better, since it is lighter 
weight and generally more flexible.


More information about the Digitalmars-d-learn mailing list