6 ms·
Yes, Rust is by far the most unreadable language that I've tried. I really wanted to like it but everything is just so ugly, unclear, and (seemingly) unnecessar
by psv1 7y ago
Yes, Rust is by far the most unreadable language that I've tried. I really wanted to like it but everything is just so ugly, unclear, and (seemingly) unnecessarily complicated.
- saagarjha 7y agoWorse than C++?
- dman 7y agoIs that the bar?
- liamdiprose 7y agoIt's the sanity check to see if a language really is the worst someone has seen.
- dman 7y agoGiven how often the C++ complexity argument is made, I am genuinely concerned that Rust will fully deliver on its promise on being simpler than C++. Only in retrospect will it be evident that it was the wrong goal to shoot for all along the way.
- bluejekyll 7y agoI don’t think Rust has ever promised to be simpler than C++. It is simpler, in my opinion, but while I think it’s probably a good goal to shoot for, I’ve never seen anything that says it is an explicit goal of the language. It does go out of its way to be ergonomic, which could be interpreted as simpler.
- discardable_dan 7y agoBrainfuck exists. It's fine.
- deleted 7y ago[deleted]
- klyrs 7y agoWhat? Brainfuck is one of the easiest languages to read. It's almost entirely context-free; you can immediately infer what's going to happen at any given point of the code, except brackets, which require a bit of counting if you're not using a syntax highlighter... (yes this is parody but so is my parent)
- cdirkx 7y agoCould you expand on this? I have heard many people say this about Rust, and I would like to know why. I myself am now so used to Rust's syntax that I don't know what is confusing or unreadable about it, and would like the outside perspective.
- petschge 7y agoFirst example scrolling through that post: How is static keymaps: [[[u16; 3]; 2]; 1] an improvement over const uint16_t keymaps[][2][3] u16 is marginally nicer than uint16_t, but why is there a colon? and why do we have to nest square brackets instead of [1][2][3] (or maybe even better [1,2,3] which you can get with suitable C++ libraries)? Sure I can parse Rust. But it is definitely more complicated, and more "noisy".
- pcwalton 7y agoTypes going after identifiers avoids the need for the lexer hack, which causes all sorts of problems in C (such as "typename"). A colon nicely separates the two; I prefer something there as opposed to "x int" like in Go. You have to nest square brackets to avoid ambiguity. Is &int[] an array of references or an reference to an array?
- petschge 7y agoI am sure there is good theoretical arguments. But they are hard on the humans. Ideally I would want something like constdata keymaps[1,2,3, u16] That is easy to read, gets rid of all the extra line noise and directly tells me everything I need to know about memory layout and performance. 1.) it is constant, known and compile time and can be put into a read-only segment (or possibly flash rom on an embedded system). 2.) it is named keymaps. The name is important and should come early 3.) it is an array. arrays and primitive datatype have many important differences and programming languages should not try to hide that. 4.) it has dimensions 1 by 2 by 3 (in that order). Listing the "3" first in Rust when the first dimension only has extend 1 might have good reasons but is damn hard to read if you have more than 2 dimensions. Especially if you end up with things like 3 by 3 by 4 by 3. Which of the inner two is larger? 5.) Having the type of the element last makes sense, because in terms of memory layout that just means that we have 2 consecutive bytes. I also makes it easier to which from "a 1 by 2 by 3 array of u16" to "a 1 by 2 array of (three vectors of u16)". Now you will probably give me reasons why I can't have that. But when I am coding I don't hard how hard it is on the compiler writers (as long as I can express things unambiguously), but want to have it as easy as possible so I have brain cycles to spare to think about data layout and algorithms.
- boltzmann_brain 7y agoTo each their own. Coming from C++, I find Rust elegant and succint. I don't want to look at C/C++ anymore. Now of course nothing beats the elegance of Haskell.