5 ms·
I thought people got along with Rust due to its features and semantics and learned to live with the syntax. Not it being something one would copy. (I'm personal
by mhd 4y ago
I thought people got along with Rust due to its features and semantics and learned to live with the syntax. Not it being something one would copy. (I'm personally still hoping for a Ratfor/Coffeescript transpiler)
Also, wonder how long it'll take until we see a "Aluminia" fork...
- jimbob45 4y agoWhat is it that people hate about Rust syntax beyond the terrible lifetime syntax? Seems pretty reasonable to me.
- xigoi 4y agoSemicolons, braces, double colons Using "<" and ">" as both operators and delimiters Turbofish Symbols instead of words (ref -> &, and -> &&, not -> !, …) Inconsistency (Why [i64; 5] and not something like array<i64, 5>?)
- aaaaaaaaaaab 4y agoThe community.
- markusde 4y agoIs lifetime syntax so terrible? Personally I like that all the subtyping relations are in the same place (lifetime outlives, polymorphism etc) and that they can be written inline until complicated enough to justify a ``where`` block.
- still_grokking 4y agoRust's syntax is just baroque. It's full of unnecessary noise and additionally very irregular. (With complete craziness thrown in between like the semicolon rule to "visually distinguish" procedures and functions, which must be a kind of joke I don't get). I really don't understand how such a conceptionally well thought out language got this pretty ugly syntax. (And no, you don't need such ugly syntax "because language features". Just have a look at Scala 3 that is much more powerful but maintains a clean, almost pythonic syntax).
- Syzygies 4y agoRust is a fly-pollinated flower. Without garbage collection, it needs flies. Rust is in part designed to look familiar to C programmers. Rob Pike once famously described C syntax as able to survive a channel that mangled whitespace. That's less of an issue now, but habits die hard. Indentation in place of syntax is nevertheless controversial. That's a toy version of the bigger question: Why should text be required to carry a load that a smart editor can infer? In Clojure, some prefer ;; to ; because the comments stand out better. Um, syntax coloring? I dislike all comment characters, and for many years I preprocessed a practical version of "comments are flush, code is indented". Ownership is nevertheless pure genius, and one can define more powerful operations on Rust's restricted notion of data than on general data. I'm imagining a "lisp without parentheses" that transpiles monadic parsers on steroids (aimed exactly at Rust data) to Rust. It will take me a while.
- kazinator 4y ago> Rust is in part designed to look familiar to C programmers. Rust may be accompanied by a design statement like that somewhere, but it actually does no such thing.
- Syzygies 4y agoI'm sure you're right. Rust is a popular language in Haskell user surveys, as it's not such a stretch coming from Haskell. The majority of the lines I've ever written were in C. When I look at Rust, all I see is `{};`
- IshKebab 4y agoI assume he means the basic syntax like the fact that everything is an expression, `name: type` not requiring brackets for `if` and `for` etc. Most of the ugly Rust syntax is for advanced features like lifetimes and generics.