Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-09 Thread paddy horan
] Changing type of array lengths On windows it depends if it's a 32 or 64 bit binary, like on every other system as well. usize is usually used by Rust containers for indexing (see for example Vec in the standard library) and I found it personally very annoying if libraries break that rule, because

Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-07 Thread Marco Neumann
On windows it depends if it's a 32 or 64 bit binary, like on every other system as well. usize is usually used by Rust containers for indexing (see for example Vec in the standard library) and I found it personally very annoying if libraries break that rule, because in Rust you have to be

Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-07 Thread Wes McKinney
What would be the argument for using usize over i64/u64? Is usize 64 bits in Rust when compiling on Windows? On Fri, Dec 7, 2018 at 9:48 AM Andy Grove wrote: > > I am in favor of using usize. > > Thanks. > > On Thu, Dec 6, 2018 at 7:20 PM paddy horan wrote: > > > All, > > > > As part of the PR

Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-07 Thread Andy Grove
I am in favor of using usize. Thanks. On Thu, Dec 6, 2018 at 7:20 PM paddy horan wrote: > All, > > As part of the PR for ARROW-3347 there was a discussion regarding the type > that should be used for anything that measures the length of an array, > i.e. len and capacity. > > The result of

Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-07 Thread Marco Neumann
One question here is: do we want to support datasets with more than 4G entries on 32bit systems? If so, how would this even be possible (since you cannot just fit that much data in any addressable memory chunk in Rust)? So I would say: usize is idiomic and supports large enough datasets on the

Re: [RUST] [DISCUSS] Changing type of array lengths

2018-12-07 Thread Wes McKinney
Thanks for raising the issue, Paddy. In C++/Python/R we often work with vary large contiguous datasets, so having support for 64-bit lengths is important. If supporting this in Rust is not a hardship, I think it's a good idea. For IPC (shared memory) or RPC (Flight / gRPC), in many cases it would

[RUST] [DISCUSS] Changing type of array lengths

2018-12-06 Thread paddy horan
All, As part of the PR for ARROW-3347 there was a discussion regarding the type that should be used for anything that measures the length of an array, i.e. len and capacity. The result of this discussion was that the Rust implementation should switch to using usize as the type for