Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
p-squared
· 5y ago · 0 comments
Maybe Rust makes newtypes _easy_, but certainly C supports similar idioms by way of wrapping data in a unique struct.
Comments
[–]
steveklabnik
5y ago
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.