Earlier quoted context omitted.
absolutely yes. I even gave three different places where parenthesis can be used and have different meanings
You can also use the letter a in 3 dufferent places and have different meanings, and is also not an example.
Rust's Ugly Syntax (2023)
121–130 of 171 posts
Re: Rust's Ugly Syntax (2023)
#122Re: Rust's Ugly Syntax (2023)
#123Earlier quoted context omitted.
That's because the code triggering compilation error is using reference. If you use Rc or Arc (which pays runtime cost) there should be no lifetime at all. Albeit I admit there somewhat exists a community sentiment like "if you use Rust, you should maximize its zero cost abstraction feature so lifetime is good and generics good", and my (minor) opinion is that, it's not always true to all users of Rust. And the clums…
> And the clumsy Arc >> makes users feel bad about using runtime cost paid types Yeah, this would look worse than any of the "complicated syntax" examples in the blog post. A language should be designed so that the typical case is the easiest to read and write. Syntax for the most common abstractions. Rust forces you to be explicit if you want to do an Arc >>, but lets you inherit lifetimes almost seamlessly. That me…
Re: Rust's Ugly Syntax (2023)
#124 "I think that most of the time when people think they have an issue with Rust’s syntax, they actually object to Rust’s semantics."
You think wrong. Rust syntax is horrible because it is verbose and full of sigilsRe: Rust's Ugly Syntax (2023)
#125Earlier quoted context omitted.
in OCaml, the single quote is a valid char for an identifier: let f = ... and let f' = ...
I did not know that, and I question that choice as well. Why would you use that? It's a little less bad, because you can just have your own style guide that says "Don't do that".
Re: Rust's Ugly Syntax (2023)
#126"I think that most of the time when people think they have an issue with Rust’s syntax, they actually object to Rust’s semantics." You think wrong. Rust syntax is horrible because it is verbose and full of sigils
Re: Rust's Ugly Syntax (2023)
#127Someone needs to tell them about async Rust. Big yikes.
Re: Rust's Ugly Syntax (2023)
#128Earlier quoted context omitted.
The use of ' as a symbol that has any meaning on it's own has got to be one of the most stupid choices I've seen in a language. It's made worse by the fact that you can still use '...' as s character literal. Not only is is incredibly ugly it's also rather confusing, but it fits well into how I view Rust, complicated for the sake of making the developers look smart. It wouldn't fit the syntax of the language obviousl…
Wait. Are you a Cobol programamer? Your argument has nothing to do with ' per se; it's completely generic for every "symbol" in a language. https://www.mainframestechhelp.com/tutorials/cobol/arithmetic-statements.htm "Confusing" is mostly a question of familiarity; "ugly" one of taste. When you're designing a language's syntax, there is a tension between making the language feel recognizable to beginners/non-users an…
I have to disagree. I've been working on HashBackup for 15 years now, and believe me, my understanding of backups has grown immensely over those years - with Python. Python may have some things I have to work around, as all computer languages do, but after all this time I still love working on and just reading through the code that has resulted from over 3200 commits.
Python's simple, easy-to-read syntax, encourages me to change things, even in a complex section of code that I haven't looked at in years. For me, Rust's emphasis on multi-character syntax vs keywords makes it visually unappealing and ugly, and I don't think I'd enjoy working on ugly code for 15 years, even if it does run fast. Not intending to start a huge language discussion, but I do think the specific point of Python not being suitable for experts in a problem domain is not true, at least not for me.
Re: Rust's Ugly Syntax (2023)
#129"I think that most of the time when people think they have an issue with Rust’s syntax, they actually object to Rust’s semantics." You think wrong. Rust syntax is horrible because it is verbose and full of sigils
Still trying to understand when i have to put ||
Re: Rust's Ugly Syntax (2023)
#130 pub fn read(path: Path) -> Bytes {
let file = File::open(path);
let bytes = Bytes::new();
file.read_to_end(bytes);
bytes
}
Here is is in raku (https://raku.org): sub read(Str:D $path --> Buf:D) {
$path.IO.slurp: :bin
}
[the `--> Buf:D` is the raku alternative to monads]