Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Variable-size as in C++, or variable-size as in Rust? Because they both seem like mistakes to me, but not everyone seems to agree. :)


I don't think it's a mistake in Rust, because of array indices.


I'm not convinced that array indexing is the primary use case of integral variables. And since this is the use case most often espoused for ints, they should probably be renamed to something more appropriate (intptr/uintptr? index/uindex? idx/uidx?). And heck, while we're at it, bare numeric literals should probably default to i32 rather than int (as gross as that feels, it's the least bad option that doesn't involve removing numeric literal type inference). But perhaps this is the wrong forum for this discussion. :P


I agree it is weird too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: