Re:Rust for C++ programmers – part 3: primitive types and op...
by Ygg2 on Wednesday April 23, 2014 @06:38AM
(#7633146)
I do remember a discussion on mailing list that all uint/int would be just fancy typing for u64/i64.
[ Parent
| on HN ]
Re:Rust for C++ programmers – part 3: primitive types and op...
by simias on Wednesday April 23, 2014 @09:50AM
(#7633905)
Wouldn't that mean that the code would have a huge performance penalty when running on 32bit hardware?
I think C99's way of handling that is fine, if you want to use whatever native width happens to be on your hardware you just use int/unsigned, otherwise you have stdint.h.
Like C, rust could mandate a minimal range for each type in the standard, but setting the type width in stone seems dangerous to me, both for backwards and forwards compatibility.
Re:Rust for C++ programmers – part 3: primitive types and op...
by coldtea on Wednesday April 23, 2014 @10:23AM
(#7634110)
>Wouldn't that mean that the code would have a huge performance penalty when running on 32bit hardware?
Or it could just forget 32bit hardware altogether. Even mobile phones are going 64bit already -- and the language will be ready for production in 1-2 years, where even more platforms will be 64bit.
It's not like they have to compromise just to be able to run on some embedded stuff.