Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Yeah, I hear you. I think this is fair. And at least some of it comes down to preference, that is, I don't think that the syntactic noise is very much, but others can certainly disagree. The others would mostly be a "nuh uh" since I don't have numbers anyway :)

At the end of the day, Rust can never be great for every single last programmer, and this is entirely okay.



sort by: page size:

Which is fair. The author also highlights an interesting problem: Some of us will opt to not use Rust, even when we should, simply because the language doesn't appeal to us.

I love the idea of Rust, but find the syntax to be just awful, and the entire thing just overly complex. I'm not saying that Rust isn't the way it is for good reasons, but the code is often hard to read. Some of the syntax choices are in my mind questionable and serves only to have Rust programmer appear smarter than the rest of us.

Rust shouldn't try to accommodate people like me, because it will make everything worse for everyone. Instead I should look elsewhere, may not to C, I'm not that clever, but to languages like Go, Nim, Crystal or Hare. It's important that we have choices, because even the best designed language, and I do consider Rust a well designed language, will fail to appeal to everyone.


I understand your point and kind of agree but you should also keep in mind that Rust is a relatively young language. I would treat these as growing pains.

I think your complaints about Rust would depend on the quality of the code. You can go wild, or you can keep things simple.

I think that's perfectly fair. Rust isn't the best language for everything. Not everyone writes databases, codecs, filesystems, kernels, protocol implementations, etc.

I don’t consider this a positive.

I would, on balance, prefer to have a language with a smaller feature set that limits the amount of syntactic variability in the code I see. This, I believe, allows me to focus on the problem, not on the language features the person is using to solve the problem.

With Rust it always feels like there are changes and, at times it feels exhausting having to ‘keep up’. It also means that there’s high variability in the code you see in the wild.


I definitely agree with most of your points.

Code is read much more often than written, and most newer languages optimize for convenience rather than readability.

In my view Rust is actually pretty verbose compared to other new languages, and feels a bit cumbersome to write. Technically it could be made quite a bit leaner syntax-wise.

I just wanted to point out that Rust and the Rust community often share your view and want to optimize for readability as well. There actually was a lot of heated discussion last year around proposals that suggested reducing readability for convenience.


Can you elaborate on what exactly you don't like about Rust's syntax? I'm always surprised when I hear this, because a lot of the things that get pointed out tend to have good reasons for the way they are.

I write rust professionally and really like it, but I do think that its noisy syntax is a flaw. I'm not sure how I would clean this up, but it really can be inscrutable sometimes.

Your examples are glossed over too quickly. So far, I'm trying to see what you are saying, but I don't get it. In short, I'm open to being convinced, but you aren't making your points convincingly.

Want to make a detailed list of your so-called "gratuitous" syntax and invite discussion, point by point, in an open-minded way?

If there is a simpler syntactic way to capture the semantics and design goals of Rust, I think people would be open to hearing it.

I don't think you'll feel the same way after you invite discussion around it.


My overall impression regarding Rust is that it has an extremely noisy syntax (and I'm a pro {} guy).

I get the opposite feeling. When I write in Rust, I have feeling "that's how programming shouldn't work". The syntax is awkward and you are expected to spend weeks to get anything done. Ultimately, it seems to come down to Rust fans who have a sunken cost fallacy - I spent weeks learning this, so they think it is worth it.

Interesting. We definitely should have this conversation in the proper detail, because my estimates of Rust's language design priorities must be off.

Syntax is literally the first thing people coming to a language see. Hence the complaints :)

If something clicks immediately for you ,might not click immediately (or at all) for others ;) However, Rust's potential syntax issues arise from the fact that they try to express complex concepts within a limited set of characters (and it's a problem any sufficiently complex language will face), so of course people will complain :)


I'm not a Rust programmer (yet?) but this seems like a pretty valid set of criticisms which I'll keep in mind if/when that changes.

But I can, and I do; that's still too much noise for me. I'm sure the code is fine by Rust standards, but to me it looks like Perl with control issues. I don't need any help from my programming language with micromanaging the code I write or the way I write it. I'll ask when I want assistance, and until then I prefer if they stay the hell out of my way. I won't claim to write bug-free software; the only way to write bug-free software is to not write it at all; spending half my energy on sweet talking a psychotic compiler around every single detail is a perfect recipe for missing the bigger picture and ending up solving the wrong problems.

Yep. ‘Tis true. I keep telling Rust people that I could do with less syntactic overhead and that sometimes I just want GC, but I don’t think it’s a priority for the community and they already have a lot on their plate and it does basically everything else right, imo.

This is all subjective of course. I for example feel the exact opposite of what you described, and I think the overwhelming majority of Rust coders prefers it to explicit matching (which I find is just code noise).

I don't feel that Rust is actually well designed. The borrow checker and lack of GC makes it well suited to the tasks that traditionally one would use C or C++ for, and it is definitely safer than those language.

But in terms of overall design it doesn't feel very cohesive, and priority is put in odd places. For example, error handling is an area where people almost always resort to 3rd party libraries. That, to me, having to rely on third party libraries for such basic features is a sign of a serious design flaw. Meanwhile, "clever" things like zero cost map and filter are prioritized and in the language for a long time.

Overall it feels like a language that prioritizes "clever" features at the expense of boring but basic needs. Also any criticism is met with hostility rather than accommodation.

It's a fine language, but I can't say that I love it.


Agree and also I think the main issue is that parts of the syntax are pointing to ideas that are not present in common languages, but which are essential in Rust. They aren't merely syntactical choices and can't be papered over or omitted. If you don't want to consider these concerns (like lifetimes) then it's probably not the language for you and changes in syntax won't help (much) there.
next

Legal | privacy