Hacker News new | ask | show | jobs
by dextro42 673 days ago
Maybe I haven't used Rust enough (still at the very beginning of the learning process) but the post fits my experiences.

When first starting a project with a REST interface (using axum and axum-login for auth) everything worked until like 1-2 month later when the login crate changed the interface completely. It wasn't much work to adapt but it feels like many crates are still in pretty active development and the recommendations on whats the current way to go change often.

Also regarding the syntax, it is often very verbose and if you start using async it gets even worse. I know it's still in development and as far as I know the async part is still far away from a full blown stable implementation but that doesn't make it more usable. The syntax isn't meant to be precise/easy to read but to encapsulate everything which otherwise might be a trap and fall on your feet later so I think a lot of the verbosity comes from the borrow checker.

Regarding the UUIDs, its a nice anecdote, it feels like it might point to something. On the other hand UUIDs do change (or at least get new features or versions) and the interfaces can be enhanced if the way the library is used changes. So I see why they would need many releases/commits but (without checking the GO library) I would expect it to be a fully functional UUID library with a good interface also.

1 comments

Verbosity in Rust I think is natural because of what the language is trying to achieve. It's understandable that people would rather not bother with it and I definitely don't advocate everyone use Rust (and definitely not use Rust for all their projects). A lot of times it is because Rust isn't the right tool, but the article is just comparing languages and not really their uses.

If you build something in Rust and version lock like you would in any other package management system, why would you have issues with a dependency on something that is happily running and doing it's thing? If you must be on the latest version of everything, this is going to be problem in every language. I notice people tend to forget that not long ago everyone vendored their deps in Go for the same reasons and still do if stable is the ultimate goal. Save updating for when it's necessary, like security updates.

Be careful about just following the UUID anecdote. I actually did take a look at the commits for the Rust UUID crate. Frankly, it just seems to be popular and well maintained. Many commits are very small spelling and documentation updates. Rust has really great documentation features and the community is very good about leveraging those features. Go see for yourself.

I think we have the same opinion there.

Rusts verbosity (and thus, harder to read syntax) is there on purpose and it's nice you do not have to worry about a lot of things because the compiler does for you.

You are right with the updating part. I think what annoys me the most is that you often have to update (because you need feature x, just now released) and you will also get a new api. It feels (highly subjective here) as it is not yet so stable as in other languages.

I also scrolled over some commits from the UUID repo. You are right, the maintainers seem to be doing a good job publishing a good crate with great documentation and the required maintenance work.