Email or username:

Password:

Forgot your password?
1 post total
Jonathan ‘theJPster’ Pallant

github.com/rust-lang/rust/pull

Soon you will be able to write c"Hello" in rust and get a valid UTF-8 encoded *NUL-terminated* string. This is amazing for people who work with C APIs.

chrysn

@thejpster I'm conflicted about this. Sure it's nice ergonomics, but `cstr!(...)` wasn't that bad, and it feels like it's giving a foreign language construct more weight in the language than it should have. Yeah it's used widely, but so is `hexlit!(...)`, and where do we stop.

Adriano

@thejpster “you’re only encouraging them”

Go Up