www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.boxer

reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <alex lycus.org> writes:
Hi,

Any particular reason this was removed in favor of std.variant?

No matter how I look at it, they serve very different purposes: 
std.boxer was simply used to wrap an arbitrary value in a (class) heap 
box; it had nothing to do with discriminated unions as std.variant does.

-- 
Alex Rønne Petersen
alex lycus.org
http://lycus.org
Sep 01 2012
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 9/2/12 8:16 AM, Alex Rønne Petersen wrote:
 Hi,

 Any particular reason this was removed in favor of std.variant?

 No matter how I look at it, they serve very different purposes:
 std.boxer was simply used to wrap an arbitrary value in a (class) heap
 box; it had nothing to do with discriminated unions as std.variant does.

There was a lot of functionality overlap and std.boxer had bitrotten quite a bit. I agree that a way to easily place objects in classes would be useful. What would a modern design look like? Andrei
Sep 02 2012