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

Maybe Rust makes newtypes _easy_, but certainly C supports similar idioms by way of wrapping data in a unique struct.


The only significant difference is that you have to give the inner value a name in C, but you don't in Rust. It's a pretty marginal advantage.




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

Search: