Re: Adding a payload to a type

2019-05-27 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 27 May 2019 at 08:40:45 UTC, Amex wrote: I have some types I've declared and I'd like to magically extend them and add data. The problem is I inheriting from them them is bad news. Suppose, for example, I have an image type that is used in an application. For a small part of the ap

Adding a payload to a type

2019-05-27 Thread Amex via Digitalmars-d-learn
I have some types I've declared and I'd like to magically extend them and add data. The problem is I inheriting from them them is bad news. Suppose, for example, I have an image type that is used in an application. For a small part of the application it needs to associate with each image type