logoalt Hacker News

sgeisenhtoday at 1:40 PM1 replyview on HN

This closely resembles implicit conversion from C++ and in many serious codebases it is considered poor practice because it leads to a lot of hidden control flow.

I think Rust strikes a nice balance but there’s enough magic that some people still get frustrated. Following traits can get tedious at times.


Replies

onlyrealcuzzotoday at 2:35 PM

> This closely resembles implicit conversion from C++ and in many serious codebases it is considered poor practice because it leads to a lot of hidden control flow.

Yes, which is why there's progressive modes of compilation to not allow anything ambiguous if that's what you want (i.e. an enterprise codebase).

But, a junior can still try things out in weaker modes of compilation, and then once they've got something working, it is typically very easy to do the pedantry to remove ambiguous behavior.