Bug#663180: Provides no zero value

2012-03-11 Thread David MENTRE
Hello, 2012/3/11 Goswin von Brederlow : > An option type has the drawback that you have to extract it every time > you use it. That means more typing, less readable code and slower > code. That might seem minor but it does add up. Yes, I know. That's why I suggested you use it in your *initializa

Bug#663180: Provides no zero value

2012-03-10 Thread Goswin von Brederlow
David MENTRE writes: > Hello, > > 2012/3/10 Goswin von Brederlow : 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. > > Yes. > >> let () = Printf.prin

Bug#663180: Provides no zero value

2012-03-10 Thread David MENTRE
Hello, 2012/3/10 Goswin von Brederlow : >>> 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. Yes. > let () = Printf.printf "%s\n" (Sha1.to_hex (Sha1.string ""

Bug#663180: Provides no zero value

2012-03-10 Thread Goswin von Brederlow
Eric Cooper writes: > On Sat, Mar 10, 2012 at 02:00:58PM +0100, Goswin von Brederlow wrote: >> David MENTRE writes: >> >> > Hello, >> > >> > 2012/3/9 Goswin von Brederlow : >> >> I found myself in a situation where I needed to fill in a dummy Sha1.t >> >> into a record to initialize an array. I

Bug#663180: Provides no zero value

2012-03-10 Thread Eric Cooper
On Sat, Mar 10, 2012 at 02:00:58PM +0100, Goswin von Brederlow wrote: > David MENTRE writes: > > > Hello, > > > > 2012/3/9 Goswin von Brederlow : > >> 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 >

Bug#663180: Provides no zero value

2012-03-10 Thread Goswin von Brederlow
David MENTRE writes: > Hello, > > 2012/3/9 Goswin von Brederlow : >> 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 opt

Bug#663180: Provides no zero value

2012-03-08 Thread David MENTRE
Hello, 2012/3/9 Goswin von Brederlow : > 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 f

Bug#663180: Provides no zero value

2012-03-08 Thread Goswin von Brederlow
Package: ocaml-sha Version: 1.7-2 Severity: wishlist Tags: upstream patch Hi, 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 opt