std.boxer and arrays

Bill Baxter dnewsgroup at billbaxter.com
Tue Oct 16 17:16:10 PDT 2007


Marcin Kuszczak wrote:
> Walter Bright wrote:
> 
>> Carlos Santander wrote:
>>> Maybe I missed something, but does the inclusion of std.variant mean
>>> that std.boxer will be deprecated or removed at some point?
>>
>> Yes. If you're using boxer, take a serious look at variant, and see if
>> that works for you.
> 
> There is missing functionality in variant though. I mean converting variadic
> function parameters into array of Boxes. It's nice, so it should be
> retained IMHO.

I just used std.boxer for the first time recently.
The thing that I found missing was methods for working with and 
converting boxed arrays (*not* arrays of boxes).  You can only unconvert 
to the exact type of the original, and there's no overloaded opIndex or 
getElem/setElem functions.  No way to ask what the type of an element is 
either.  I wrote some templates that did the trick for what I wanted, 
but I had to copy a few private things out of std.boxer to do it.  I'd 
file an enhancement request and maybe even a patch if I believed anyone 
would do anything about it.

--bb





More information about the Digitalmars-d mailing list