[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#663180: Provides no zero value



On Sat, Mar 10, 2012 at 02:00:58PM +0100, Goswin von Brederlow wrote:
> David MENTRE <dmentre@linux-france.org> writes:
> 
> > Hello,
> >
> > 2012/3/9 Goswin von Brederlow <goswin-v-b@web.de>:
> >> I found myself in a situation where I needed to fill in a dummy Sha1.t
> >> into a record to initialize an array. I didn't want to use an Sha1.t
> >> option because the value is only every invalid during initialization
> >> and an option type would mean extracting from "Some x" at every other
> >> place.
> >>
> >> The attached patch adds a Sha*.zero value that can be used for this
> >> purpose.
> >
> > Why don't you define this Sha1.zero value in your code and use it
> > there? This patch seems to me very specific to your code and of
> > dubious use in a library.
> >
> > Best regards,
> > david
> 
> I can't because the Sha1.t is abstract.

I think what David means is that  you can just define
    let my_initializer = Sha1.string ""
somewhere at the beginning of your code.

-- 
Eric Cooper             e c c @ c m u . e d u



Reply to: