Interestingly, my life starts at the end of the article, with the simple verison of the code, and as my understanding of rust widens, I go up to the beginning of the article and better define my function...
Rust's Ugly Syntax (2023)
21–30 of 171 posts
Re: Rust's Ugly Syntax (2023)
#22Kinda disingenuous, you don't reskin one language in another to make an argument about syntax -- you develop a clear syntax for a given semantics. That's what rust did not do -- it copied c++/java-ish, and that style did not support the weight. When type signatures are so complex it makes vastly more sense to separate them out, Consider, read :: AsRef(Path) -> IO.Result(Vec(U8)) pub fn read(path): inner :: &Path -> I…
To me this example is not more clear than normal Rust
Re: Rust's Ugly Syntax (2023)
#23Re: Rust's Ugly Syntax (2023)
#24Just give me Rattlesnake or CrabML and I'll stop complaining :-)
Re: Rust's Ugly Syntax (2023)
#25For my own situation, the articles present the right way to express all possible performance/error handling (which is expected in a standard lib) and then goes on to show how I actually code it in my own softawre where I don't really need the level of detail/finetuning of the standard lib. Interestingly, my life starts at the end of the article, with the simple verison of the code, and as my understanding of rust wid…
Re: Rust's Ugly Syntax (2023)
#26I think the article makes a good point, but the actual example isn’t Rust’s worst, not even close. It gets really hard to follow code when multiple generic types are combined with lifetime markers. Then it truly becomes a mess.
I always, always forget what `'a: 'b` means, because I remember it always being the opposite of what I think it is, but memorizing that obviously doesn't work because then it will just flip again the next time. It's so annoying.
Re: Rust's Ugly Syntax (2023)
#27Earlier quoted context omitted.
Agree about the example! I can't tell if this article is tongue-in-cheek or earnest. I'm unclear on the point the author is trying to make.
My reading is: people use Rust because it’s fast but then they complain about the semantics that make it fast. In other words, be careful what you wish for. Most people would probably be better served by a language that was a tiny bit slower but had better developer productivity. However, once you deviate from the goal of “as fast as possible”, then you have to choose which parts you want to sacrifice speed for produ…
D maybe? D and Rust are the two languages which come to mind when I think about "possible C++ replacements".
Re: Rust's Ugly Syntax (2023)
#28Kinda disingenuous, you don't reskin one language in another to make an argument about syntax -- you develop a clear syntax for a given semantics. That's what rust did not do -- it copied c++/java-ish, and that style did not support the weight. When type signatures are so complex it makes vastly more sense to separate them out, Consider, read :: AsRef(Path) -> IO.Result(Vec(U8)) pub fn read(path): inner :: &Path -> I…
Re: Rust's Ugly Syntax (2023)
#29Re: Rust's Ugly Syntax (2023)
#30I think the article makes a good point, but the actual example isn’t Rust’s worst, not even close. It gets really hard to follow code when multiple generic types are combined with lifetime markers. Then it truly becomes a mess.
I always, always forget what `'a: 'b` means, because I remember it always being the opposite of what I think it is, but memorizing that obviously doesn't work because then it will just flip again the next time. It's so annoying.
Rust can improve this by introducing syntax like `'a contains 'b`