digitalmars.D - IAllocator
- Andrei Alexandrescu (1/1) Jan 03 2016 https://issues.dlang.org/show_bug.cgi?id=15509 is up. Any takers? -- And...
- Rikki Cattermole (10/11) Jan 03 2016 Now I'm worried, this will break a lot of my code.
- Andrei Alexandrescu (9/17) Jan 04 2016 May break if you use the IAllocator type explicitly a lot; you need to
https://issues.dlang.org/show_bug.cgi?id=15509 is up. Any takers? -- Andrei
Jan 03 2016
On 04/01/16 11:44 AM, Andrei Alexandrescu wrote:https://issues.dlang.org/show_bug.cgi?id=15509 is up. Any takers? -- AndreiNow I'm worried, this will break a lot of my code. I'm just not convinced that RefCounted is the correct tool for this job. It changes the allocator type. IAllocator is an interface for a reason. It allows swapping things out without worrying about implementation and using templates. If you go this route, I want a SwappableAllocator implementation like SwappableImage[0] is. [0] https://github.com/rikkimax/alphaPhobos/blob/master/source/std/experimental/graphic/image/interfaces.d#L205
Jan 03 2016
On 01/03/2016 11:50 PM, Rikki Cattermole wrote:On 04/01/16 11:44 AM, Andrei Alexandrescu wrote:May break if you use the IAllocator type explicitly a lot; you need to change that name.https://issues.dlang.org/show_bug.cgi?id=15509 is up. Any takers? -- AndreiNow I'm worried, this will break a lot of my code.I'm just not convinced that RefCounted is the correct tool for this job.It may not because it gives access to the underlying interface, which I'd rather keep encapsulated. I think a hand-defined proxy struct around the IAllocator type is the ticket.It changes the allocator type. IAllocator is an interface for a reason. It allows swapping things out without worrying about implementation and using templates.That won't go away. I guess I need to write the code to fully explain what's needed. Andrei
Jan 04 2016