I have a love-hate relationship with Rust. A lot of the cryptic abbreviations (like "were too lazy to type the word function") piss me off, I hate the endless mindless shit-show of "let let let let let let let let let", but at the same time I LOVE how they organized typecasting to literally say what variables are in a uniform and future-proof construct.
It's why I'm a fan of the C99 types and hate regular C / C++ types, where you can declare "int" and depending on the compiler get a 8 bit, 16 bit, or 32 bit number, or "long" where it could be 32, 64, or even 128 bit. Don't even get me STARTED about "long long" where it could be 128 or 256.
Just like C99's uInt32, there's ZERO ambiguity when you say u32 in rust. You KNOW you're working with an unsigned 32 bit integer.
I even dislike that in Pascal and Ada, where byte/shortint == u8 / i8, word/integer = u16/i16, dword/longint is the 32 bit, qword/qLongInt is 64 bit. Though at least those are and have remained consistent the past 40 years, unlike C where you basically roll 2d6 to determine at random what each brand compiler -- or even VERSION of the same compiler -- is using.
The syntax of "print" makes me want to punch someone in the face... but I've never been a fan of things like C's "printf" or other such "template string" approaches. It gets worse with even more cryptic syntax like the gibberish <> use that -- much like typescript -- reeks of someone going "C++ was too simple, what can we do to make this as painfully and aggravatingly cryptic as possible".
Seriously, I'd sooner punch myself in the face than deploy brainf*** cryptic trash like:
impl<T> Foo<T> {
// Methods take an explicit `self` parameter
fn bar(&self) -> &T { // self is borrowed
&self.bar
}
fn bar_mut(&mut self) -> &mut T { // self is mutably borrowed
&mut self.bar
}
fn into_bar(self) -> T { // here self is consumed
self.bar
}
}
... and remember, this is someone who used to hand assemble RCA 1802 machine language talking.
The worst part though is the hoops you have to jump through to even TRY to get it to spit out a website. It seems excessively poorly suited to working with the strings and organization of markup, and to that end if I were to put that type of effort in just to get a compiled language in use, I could do a hell of a lot better for the same effort.
Like by using Ada with my little pre-processor where all it does is add whitespace neutral strings to it.
Rust left me wanting. Much the same can be said of GoLang. There are far better languages already out there, and it would be nice if the folks wanting to work on compilers put more effort into those, than these mindlessly cryptic new languages that bring NOTHING new to the table.