not a Go fan or an avid Rust user, but if you pardon my bluntness, those strong opinions don’t really amount to much? readability is probably the only thing Go debatably does better than Rust, and every time I try to get into the language the syntax is the wall I hit
-
-
Readability =\= familiarity to a C programmer. Once you *do* learn rust syntax and get used to it I would say it’s one of if not the most readable languages because of things like try/?, everything is an expression, FP constructs on iterators, etc.
1 reply 0 retweets 3 likes -
1) I'd argue familiarity does matter - Rust aims to replace C, targets C programmers, but is slow to learn from C due to its complexity 2) While a clear step up from C, the benefits you list have been done in other languages without nearly as much token bloat - e.g. Scala/Kotlin
2 replies 0 retweets 0 likes -
Are we implying Rust has more "token bloat" than Scala? That's... Not right.
2 replies 0 retweets 1 like -
I wouldn't say it has less. I'm not sure how Rust justifies things like "&'a" as intuitive, and macro syntax is a nightmare. These aren't the most common cases, but neither are a lot of the obscure operators and tokens in Scala.
1 reply 0 retweets 1 like -
What other syntax would you prefer for lifetimes and macros?
1 reply 0 retweets 1 like -
Replying to @pcwalton @elucentdev and
Keep in mind lifetimes and macros are concepts don’t exist in most languages (and no, they couldn’t be left out of the language without either adding GC or compromising memory safety).
1 reply 0 retweets 1 like -
Which is a good point, and I don't have a magic solution off the top of my head. But I also don't think that means it is somehow impossible to improve on, or that it isn't a problem.
1 reply 0 retweets 0 likes -
I don’t see any way to do memory safety without GC without any adding new concepts. I think we need to accept that sometimes people have to learn new concepts. The alternative is restricting ourselves to language design from the ‘80s for no reason other than nostalgia.
1 reply 0 retweets 1 like -
Let me clarify: not at all opposed to new concepts, my single issue with Rust is that all these amazing new concepts are a bit hidden/obfuscated by all of these weird syntactic elements. Accessibility is especially important when a lang brings all these cool ideas to the table!
1 reply 0 retweets 0 likes
Lifetime and macro syntax were agonizingly debated, with hundreds of messages each. The community ended up preferring the current syntaxes. This is why I take issue with the idea that Rust users don’t care about readability. Async/await syntax debates went to 1000s of messages…
-
-
...do you have a link/is that discussion public? That actually sounds like an interesting read. And yeah, I don't mean to imply that Rust isn't the result of a lot of careful decisions. But I do still think syntax is an unfortunate weak point of the language.
1 reply 0 retweets 0 likes -
Lifetime syntax debate: https://github.com/rust-lang/rfcs/pull/134 … There’s a macro one too but I can’t find it offhand.
1 reply 0 retweets 1 like - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.