← Back to context

Comment by PeterWhittaker

18 hours ago

This is less a problem with C and more a bad design decision by the musl team. In response to poor practices (programmers not checking what crypt returned), they built an arguably worse one (returning a sentinel value).

Sure, Rust's std::result can make it harder to dumb, but dumb can always find a way.

From the post:

> You can very well write a Rust function that returns "*" if the password is too long. But the big difference between C and Rust in this regard is that the norms of the Rust community do not allow that.