logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: dynarray problem: msg#00033

Subject: Re: dynarray problem
On Sat, 5 Jun 2004, Bardur Arantsson wrote:

> While we're on DynArray... there is one function which I
> miss: delete_range. I think it should be added because
> there is no other way of deleting a number of elements
> from the start/middle of the array in O(n) with the
> current interface.
> 

While we're on Dynarray, why did we create our own Invalid_arg exception, 
and not use the standard Invalid_argument exception?  Why especially did 
we override the default invalid_arg argument?  I'd much rather do string 
concatenation instead:

if (idx < 0) || (idx > d.len) then
        Pervasives.invalid_arg ("Dynarray.delete: invalid idx " ^
                                (string_of_int idx));
...

-- 
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 
Brian



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>