4 ms·
For me, the Rust syntax is hard to look at and read. I much prefer Go which reads like C, Perl, PHP, JS or many other common languages. I'm wondering if people
by everdev 9y ago
For me, the Rust syntax is hard to look at and read. I much prefer Go which reads like C, Perl, PHP, JS or many other common languages.
I'm wondering if people who prefer Phython prefer Rust? I've been developing for 20+ years and the syntax alone makes Rust feel prohibitive to me.
- carlmr 9y agoI find it has a lot of similarities with the C-family of languages. I'd say more with C++ though (generics, namespaces etc).
- Tade0 9y agoAnecdata: Not a fan of Python's syntax, but Rust looks readable to me.
- the_mitsuhiko 9y agoHow does go look more like C than Rust?
- strken 9y agoTangentially related, but I've used https://github.com/mjibson/esc https://github.com/mjibson/esc before and liked it. I found it was a bit simpler than https://github.com/GeertJohan/go.rice https://github.com/GeertJohan/go.rice.
- axaxs 9y agoYou're not alone. I've tried a few times to dive into rust, but just find something about the syntax jarring. It's not so much bad, it's just unpleasant to look at for me. I'm sure it's a great language, but not for me for that reason.
- NiceGuy_Ty 9y agoTo be fair, this sample of code includes macro usage (every function call that ends in an exclamation point is actually a macro). The syntax inside the macros is different from normal, legal rust syntax. Still, I agree that Rust's syntax approaches C++ level of complexity at times. I find that writing actual statements and expressions is simple enough, but writing structs, lambdas, and function definitions requires knowing how to specify types, type bounds (if using generics), lifetimes (if using references), and Fully Qualified Syntax (for referencing types/items in other modules). And that's before actually having to come to terms with the borrow checker. For what it's worth, once you get over the initial learning curve the cognitive burden goes down. Rust's syntax, to me, is actually visually distinctive enough that it's easy to parse out types, expressions, declarations, etc. from just a quick glance.
- vvillena 9y agoNo other language forces you to think about ownership and lifetimes the way Rust does. I find the syntax really nice, in the sense that I always know what it is saying. The hard part is not understanding the words, but grasping the meaning. That's IMO what makes Rust harder than other languages that rely on fat runtimes.
- jimktrains2 9y agoI prefer Rust because it has an actual type system capable of allowing me to express constraints and relationships. I highly doubt it's the syntax that's the issue. You're probably not use to caring about lifetimes and ownership. It's a different paradigm.
- alehander42 8y agoI still find Rust's syntax relatively nice and love Python. A "system" language with similar to Python's syntax is https://nim-lang.org/ https://nim-lang.org/