Hacker News new | ask | show | jobs
by Expurple 597 days ago
Could you share your examples of incoherence in Rust? I actually find it a small, well-designed and very coherent language. At least, when compared to huge mainstream languages. E.g., traits cover the use cases of both "abstract classes" and "concepts" in C++, or both "abstract classes" and "protocols" in Python. And there are no inconsistencies regarding using exceptions or returning errors by value (panics exist, but they are used as assertions). There's no separate ternary operator, which is redundant when you have an if-else expression.
4 comments

> Could you share your examples of incoherence in Rust?

just a nit.

I think they used a narrow definition of coherent, for blue collars, which in web often imply mundane CRUD and agency apps.

I wouldn't expand the discussion to a brother definition about a general incoherency in the language. And certainty wouldn't bring comparisons to C++ when replying to their message.

I guess by "blue collar devs" (as you said, mundane CRUD etc.) they mean devs that will quickly get replaced by AI.
Async vs non async code. It's basically two different languages imho. generics are also a big pain to work with, specially along with lifetimes. I have fun working with rust now that I am good enough at it, but I kept my objectivity in the process of learning it.
I think async/sync is a big example as someone else mentioned.

I'd also say the macro systems. Macro by example is a totally new (and let's be honest, awful) language, and the proc macros are another thing again.

Thankfully I find I very very rarely need to actually write macros, and you can avoid async most of the time unless you're doing web dev.

Still a fantastic language - easily the best at the moment IMO, but I see his point.

Anything by withoutboats, really.