On 05/04/14 09:23 AM, Simon Sapin wrote:
> On 05/04/2014 14:14, Corey Richardson wrote:
>> Sure, same thing as a C-style array, minus the fact that we don't have
>> Index implemented for unsafe ptrs.
> 
> Sure, but that difference is the important part. It’s idiomatic C to
> pretend that a pointer is like an array, but not in Rust.

I wouldn't say it's not idiomatic in Rust, it's simply a missing feature
for raw pointers along with pointer arithmetic operators. There were
previously operator overloads, but I had to remove them when switching
to inbounds pointer arithmetic since it no longer satisfies the safety
requirement of the traits. It can and should be added back to the
compiler, just without trait implementations.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to