Comments by "George Albany" (@Spartan322) on "ThePrimeTime"
channel.
-
26
-
24
-
21
-
10
-
8
-
Honestly I despise a lot of the Rust community, it doesn't serve an original purpose, it co-opts the purposes of other languages, sometimes without good justification compared to the alternatives, and then it gets injected everywhere like "replace everything with Rust" no matter how unsuitable it would be for that. Aside from despising the language for numerous reasons (its ideas are nice, but its implementation is the worst way you could've done it) the community is absolutely horrible for Rust, I've been in regular non-rust programming places, but as soon as you criticize Rust for anything, they absolutely lose their crap and call you names. I can't stand Rust, and even more I can't stand its community, its no wonder its representatives are so crap.
7
-
I hate Rust's syntax as a hobbyist in syntax design and parser development, you could not have made a much worse language syntax then Rust, Lisp makes more sense. Rust has interesting ideas, but I can't see a good reason to use it over C++, every protection it has can be just as well handled in C++ since C++11, C++ has been capable of memory safety since C++98, the problem is people keep assigning C programmers to C++ and then you're surprised when they open the C memory hole? We've had static analyzers for years telling people to stop doing that, and Rust has plenty of holes in its "sound type system" that people will abuse just the same as they did in C once anyone becomes competent in it, with competence mixed with time and performance constraints always brings a lack of safety even in "safe" code. "Safe Rust" can still perform buffer overflows and people will eventually rely on the existence of that behavior too. Course they might also just completely disregard "Safe Rust" which inherently produces bugs because it is impossible to understand Rust's overprotective behavior well enough to account for it in unsafe code, its the same as just writing straight C, all you did was move the problem down the line, if you keep pushing C developers over to Rust, and they keep struggling with the borrow checker, lifetimes, and the traits system to do even simple things people will just do what they did in C and C++ and disable the safety checks because they got in the way, and now you just fell right back to square one except now you get to claim "memory safety". That aside the ability to write and read the syntax easily determines the maintenance cost, Rust is not a maintainable language because of its verbosity, I don't foresee anyone wanting to keep any legacy Rust, (its enough of a pain maintaining legacy C when its readable, now imagine legacy Rust) which makes it questionable to try and replace C with, at least Zig is better for this.
7
-
6
-
6
-
Thing is the elimination of UB as a concept kinda misunderstands why it exists in the first place, it exists so you know what the software promises to do, its just a contract, and its a useful contract for optimization, C is ubiquitous specifically because of this, I think the writer of this article grossly misunderstands that C evolving as the a multi-platform language is what inherently allowed every other language following it to exist. If I have to write C, I'd like to have a linter inform me about UB, then I can choose when and when not to use it. (as I do in fact take advantage of UB even in C++ because it actually is a very useful tool) Cool thing about UB is that you can access implementation defined behavior that transcends a library, reaching the hardware, which is all on its own useful functionality too. (like messing with the vtables, there are no vtables in C++, their existence is completely implementation defined so any way to access them is inherently UB) Personally I'd prefer if we could have optional UB, the core standard has no UB but then the standard requires the standard machine to disable certain defined behavior that it deems useful without having to modify the language, this is definitely a gripe I have with the "no UB" languages because they treat UB as if it never served a purpose instead of only being poorly implemented. Even more helpful if we had categories of UB.
6
-
5
-
5
-
5
-
5
-
5
-
5
-
5
-
All move constructors do is swap the data, they never need to allocate, they're literally the fastest way to assign something that isn't immediately constructed, this would be the same in Rust as in C++, copy constructors mostly function for making immutable data or duplicate data you wish to modify, which I might add, you could just use CoW containers and that'll happen automatically only when you modify the data, you can also control allocations better in C++.
Also gonna point out, all compilers can optimize objects out just as well as Rust, that's not really a Rust specific thing (technically there are no objects in C++, it also produces glorified strange C binaries) that's kinda inherent to how compilation (to assembly) is supposed to work, and for languages that get compiled to a binary without a bytecode, that's pretty much what always happens.
Also you can just disable exceptions in C++ and now you don't need to throw, C++23 is also getting std::expected to enable library ease of use for this case.
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
4
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
3
-
2
-
2
-
2
-
2
-
2
-
@minneelyyyy
"Although I do have to disagree with OP, while I do recognize that a lot of memory bugs don't end up being actually able to be exploited, there are a number of actual major exploits that have happened."
For some of the big ones sure, but most of the blame for those already lies in legacy support anyway, (in a legacy C syntax too) and Rust wouldn't fix that either. Like had they written those sections in even proper C++98 with RAII, they wouldn't have happened either, Rust wouldn't have solved it anymore then C++ should have, and the reason C++ didn't solve it was because it wasn't written in C++, and you wouldn't have been able to replace it because people still rely on the C functionality as it was written for compatibility. A lot of Rust developers don't understand legacy and maintainable code, what was first written will be relied upon to never change else you will brick systems. and Rust has enough holes in even its "safe" system that it will absolutely be abused to accomplish similar things, its just a matter of people getting good and learning the esoteric things like they did with C++.
2
-
2
-
@virgodem Rust's desire to mandate runtime costs for memory safety and elimination of undefined behavior prevents a lot of optimizations that make C++ really fast. (granted its fast, one of the faster compiled languages when you don't consider build times, but C and C++ will still have it beat) A number of the compile-time safety features also prevent the compiler from properly performing optimizations that are comparatively easy for a compiler to do in C++. That which is fast can have safety integrated on top of it, that which is safe can't have speed integrated on top of it, its a one way street, if you need memory bounds checking, you can do it in C++, its always been part of the standard, but majority of the time its not needed/wanted, you don't want runtime bounds checking when you already know the bounds at runtime can't violate, that's a needless waste of performance the compiler is incapable to optimize.
2
-
1
-
1
-
1
-
1
-
1
-
1