>>25588539
>Go in particular is what Rust wishes it were in terms of adoption and being the "cool new language" but that simply isn't happening without a garbage collector.
Go was designed as a joke to make fun of terrible pajeet coders. They "FORGOT" to put enums in it, that only happens when your language was designed after some beers on a napkin as a joke. Go is terribly designed and ignores many lessons language designers should be aware of.
The reason Go is popular is because even with the flaws it has, it is better than other slop language for pajeets since those have even worse design.
There are dozens of easy to find blog posts of experienced people tearing Go's awful language design to shreds.
Rust was designed to confidently write large, complex systems codebases with C/C++ tier performance but without their huge bug potential, and it's the only language which is actually delivering on it. Go is totally useless in that realm.
>>25588589
>Rust might solve a problem for a few system programmers who program in pure C, but for the vast majority of programmers it doesnt matter in the slightest.
The vast majority of programmers write unimportant code, yes.
Rust is a niche language for the elite of systems programmers, yes.
>>25588602
>The concept of ownership and borrowing is old.
Rust is the first popular implementation of it.
>It only works for some things
It is the core memory model of Rust, so it HAS TO and DOES work for everything.
>and for others, you'll do the same shit as with C.
You're pretending Rust is 1 concept - borrowing and ownership. Rust has dozens of interesting concepts which solve important problems.
>It takes forever to compile
Many years ago, when it was new, yes. Now the compiler has been optimized and people learned to compartmentalize.
My largest project compiles under 1 minute for a full recompile, something you do every couple of months tops. Incremental changes day-to-day are sub 1 second compiles.
You also pretend that you do not get anything for this compile time. C compiles faster, sure, but you get NOTHING from C. Rust is famous for code also doing what you want most of the time once you get it to compile, with C you get random shit and undefined behaviour you have to debug.
Rust's tradeoff is a few seconds / 1 minute of compile time vs hours of debugging a mess in C with terrible tooling.
The Rust compiler does A LOT of work the C programmer does manually.
>and requires the programmer to write a lot of boilerplate code
That is fundamentally incorrect. Rust is a strongly typed language with a very rich typesystem which is essentially turing complete. While it might feel to a novice you're "wasting time" in defining your types well instead of having some garbage interpreter infer it and create a huge mess, the "boilerplate" you write in rust actually defines a lot of your program already. Well-defined types with methods and traits on them can be most of your program logic already.
Boilerplate code is useless, but Rust has no useless code. The syntax is hyperdense, and everything you write is required for some fancy feature you don't seem to understand.
>Rust doesn't go all that high like C++ and D
Complete rubbish, there is nothing limiting higher level implementations in rust. The standard lib is relatively small, but there are many ecosystem crates which are basically considered standard libary tier crates offering various high level comfort features.
The standard lib being small is due to rust devs having an insane focus on quality, which is far preferable to C++'s bloated garbage corpse standards.
>>25588743
>One example is that they are very autistic about unsafe, so they'd rather write "unsafe" 10x in one line as specifier instead of using an unsafe block.
First, let's pick apart unsafe.
You're complaining about a feature 99% of rust code doesn't need. 99% of the time, you write SAFE rust, so this doesn't bother anyone.
In C or C++, all your code is unsafe, and you have to opt-in into safety measures and tooling people developed externally to the C/C++ standards for the most part to ensure safety. NOBODY does this opt-in, hence why the C ecosystem is such a mess.
So fundamentally, Rust forcing everyone to use SAFE code for 99% of the time is highly appropriate.
Now, why is rust so anal about when you use unsafe, why don't they just slap a big unsafe block on everything?
Because of granularity. Even when writing unsafe code, not all of your code needs to be unsafe. By using a keyword infront of specific functions, traits, etc instead of blanket blocks, you can pick exactly where you want to opt-out of safety.
Since unsafe code is rare and the exception, this slight verbosity is a good tradeoff for the compiler safety gurantees provided.
>>25588783
>D
The only D anyone uses is in their pants, go ask your mom about it.
>>25588891
>Rust is a middle ground in memory management efforts needed by the monkey operating the keyboard.
>Is it a foothold to attack parallel problems? Is it a foothold to attack distributed problems?
There are 3 memory management paradigms:
1 manual (think C)
2 automatic garbage collector (think Java)
3 borrowing / lifetimes
If you do 1, you have to make sure you never fuck up.
Easy on a hello world, but as soon as you write a large codebase fuckup is inevitable.
C was designed on a PDP 11 with a few kb of memory, programs would be a few 1000 lines of code tops.
C is a TOY LANGUAGE only suitable for the TINY computers from 50 years ago.
It is unsuitable for today's computers which do so much that programs have grown to millions of lines of code.
If you do 2, your performance is unpredictable, since GC kicks in during runtime and shits up your program execution. Just look at unity games. Either small, performance uncritical games or they stutter thanks to GC.
If you do 3, you give the compiler EXTRA INFORMATION on how long the data you stuff into memory is gonna be needed by the program, and the compiler then figures out when it's safe to drop based on that information.
If you fail to give the compiler enough information to do that, it nags you about it.
That feels like it's terrible and restrictive, and it is compared to writing small cozy daredevil C programs, but once you work in a HUGE codebase you'll realise it's actually freeing and empowering.
You pawn of a menial task you had to do yourself to an automatic assistant who never fucks up and only asks you for some extra information to do it's job properly on occasion.
>>25588955
>I don't see how Rust enables you to do parallelism any better than other compiled languages.
lol
>>25588997
>>system programming and application programming
>One man's system is another's application.
I mean I suspected you didn't really get it but now you confirmed it. Sigh.
A systems language cannot have unpredictable performance. When you write a filesystem, a network stack, a driver, you need to know how long it takes. You want to basically know what assembly code the compiler generates from the code you write for the entire performance critical path.
The idea of having a garbage collector pause a file read from your disk or pause receiving network packages on the TCP/IP stack to clean up memory for a few ms is absurd.
The reason you get away with a GC language for your applications is because they mostly don't do anything performant and you have 100x the computation you require under your ass so you can be wasteful.
If you wrote an OS like that it would be a catastrophy.
The Rust debates always boil down to the same shit.
- People who don't actually know what programming is about being confused
- C people who want the freedom of writing sloppy code and deny that large C codebases are a mess
- Rust evangelists who realise how freeing and awesome Rust's restrictions are if you embrace them
I would never try to convince anyone to learn Rust. The vast majority of programmers are too shit to learn it, no offense. They're just not smart enough.
Rust is a language for the elite, not for everyone, unironically.
The use you get out of rust as an average plebbian programmer is vastly better libaries, tools and software you get to interact with.
The really good rust programmers took zero convincing. They looked at the language design, and thanks to being smart realised how amazing it is.
There is a reason why rust is the most raved about language and the most admired language in dev surveys while also the most hated language in online debates.
I would oppose any attempt to dumb down Rust to make it more accessable as well. The Rust ecosystem is in such an amazing state thanks to that elite filtration, the quality tooling and libaries available is utterly amazing.
They manage to crank out documentation consistently ... absurd.
Decades of coding, never seen decent documentation on anything cutting edge, here's rust, cutting edge as fuck, and it has GOOD to EXCELLENT documentation on pretty much EVERYTHING almost the second it comes out. Like wtf. I honestly think it's the trannies. Somehow flooding a male brain with estrogen creates peak coding ability.
And I say this as someone who's still a mediocre programmer myself, especially in Rust. I don't even own thigh-highs yet.