Re: Streams vs ranges

2012-01-13 Thread Piotr Szturmaj
Jonathan M Davis wrote: On Friday, January 13, 2012 12:17:06 Piotr Szturmaj wrote: Is there a plan to replace streams with byte ranges? Or should I just use streams? At some point, std.stream will be replace with a range-based API. There has been some discussion on the design, but it hasn't be

Re: Streams vs ranges

2012-01-13 Thread Jonathan M Davis
On Friday, January 13, 2012 12:17:06 Piotr Szturmaj wrote: > Is there a plan to replace streams with byte ranges? Or should I just > use streams? At some point, std.stream will be replace with a range-based API. There has been some discussion on the design, but it hasn't been fully fleshed out, l

Streams vs ranges

2012-01-13 Thread Piotr Szturmaj
Is there a plan to replace streams with byte ranges? Or should I just use streams? I need to do some binary parsing and I found using ranges is not very comfortable. For example to read an uint I need to: version (LittleEndian) auto r = retro(takeExactly(range, 4)); else auto r = take