[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: rust-vs-c.png (389 KB, 1920x1080)
389 KB
389 KB PNG
Which one is less bloated? Which one is faster? Which one is faster to write to be fast (note, different thing than being faster)?

Which one is your favorite? Comparison to C might be unnecessary, since Rust is a language that replaces C++ and not C
>>
my understanding is that if you just write basic c++ then it loses to rust hard. But if you use all of those really ugly and awful new features no one likes, it catches up but not sure by how much
>>
not this shit again
>>
>>102440994
C++ should ditch the old ways of doing stuff in the new standards. Fuck retrocompatibility.
C++ is more bloated as of now. Rust is not better than modern C++, but it's retard proof
>>
File: 20240918-171406.png (173 KB, 1401x460)
173 KB
173 KB PNG
>>102441048
this is modern C++ btw
>>
File: 20240918-171543.png (127 KB, 1401x371)
127 KB
127 KB PNG
>>102441076
vs rust
>>
File: rusty_llm_lmfao.jpg (1.25 MB, 1920x1080)
1.25 MB
1.25 MB JPG
I find it really amusing how there's always someone complaining about C and C++, yet, they are the most used languages in the world, every other programming language depends on it on a basic level, or to perform the optimizations of their language's "blazingly fast and memory-efficient" code.
Every new language is in some way, shape or form inspired by those two, but rather than parting ways with them peacefully, they decide to seethe and be frustrated about it, making tons of blog-posts and threads, and in the process, blaming the tool as if they were victims. Can you believe it? Frustration against tools that makes the world run. That's like being angry at the hammer because you got hurt by misusing it, absolutely hilarious!
Crabs specially criticize C heavily, they had the benefit of hindsight and greenfield design, they could have made an objectively superior language to C or C++ and taken over the world, but their technical merit of a language is so insignificant in the grand scheme of things, the syntax design so obtuse towards the human mind, and their community so entrenched in zealotry, politics and sunk cost fallacy, that they have to employ Mistral AI LLMs to defend it on an anonymous basket weaving forum.
There are no words in the English language to succinctly describe how funny this is.
>>
>>102441589
you might as well defend java
>>
>>102441715
nta, even java is more defendable than rust
>>
>>102440994
C++ has become a lot worse, it used to be quite good.
>>
>>102441076
I guess I use
using foo::bar,

more than I should, but modern C++ is more or less clean to me
>>
>>102440994
>less bloated
rust
>faster
Basically the same, but it's easy to make shot 100x slower in either language
>faster to write in
First 10k LOC in a project it's faster to write C++, after that it becomes faster to write Rust
>>
>>102440994
C++ has much more features and rules than Rust, so in that sense it's more bloated.
At runtime it's fairly even. Some things are bloatier in C++, some in Rust.
There are many manual optimizations where if you get them to compile in Rust you're pretty much done but in C++ you need to be very careful about safety. For example: multithreading, string_view. So if your problem suits Rust you can write fast code quickly. But there are also optimizations that Rust is worse at handling. It probably depends on the domain.
I don't use C++ but I'd like to learn it better. Then again, I also really liked learning PHP.
>Rust is a language that replaces C++ and not C
C++ and Rust can both replace C in many cases, so I don't think it's irrelevant. (To a large degree this already happened decades ago of course.)
>>
riddle me this how is safety a feature, why do you care if code is sage, if its has bugs, what difference is there, if its buggy and safe who cares, what if it just has no buts, that sounds good, who cares if the bugs are safe if their bigs
>>
>>102442571
What do I have in my pocket?
>>
>>102440994
>Which one is less bloated?
Rust
>Which one is faster?
Both can be close-to-C fast.
Which one is faster to write to be fast
Good followup.
Rust
>Which one is your favorite?
Rust
>Comparison to C might be unnecessary, since Rust is a language that replaces C++ and not C
WRONG.
For many of us, C++ was never fit for purpose. So we move from C to Rust. Some things will of course remain C forever.
You clearly don't know many engineers, especially ones working on low-level and/or optimized stuff.
Note that even some C++ projects are only superficially so, as they are written in the C-with-classes style.
>>
>>102442693
so with your logic, people in embedded are moving from c to rust?
>>
>>102443022
I've come across multiple embedded people who spoke very highly of embassy and described it as a game changer:
https://github.com/embassy-rs/embassy
>>
>>102443506
embussy
>>
File: zig.png (170 KB, 1024x1024)
170 KB
170 KB PNG
>>102440994
>>
>>102441013
LMAO, you don't know shit. C++ beats rust all the time.
>>
>>102441089
Ewww.... completely disgusting.
>>
>>102441089
that is fucking hilarious
>>
>>102440994
which one isn't compromised by Israeli Intelligence?
>>
File: jp.png (93 KB, 320x311)
93 KB
93 KB PNG
>>102446474
Oy vey! That is antisemitic.
Do you want your smartphone to explode in your face?
>>
>>102440994
I like C++ especially modern C++ is pretty good actually and I feel like I have a lot more freedom than I do in rust. Plus rust glows a lot and it’s very politicized which is a big turn off.

Putting stuff like
> The Rust Core Team believes that tech is and always will be political

In your releases is wild.
>>
File: 1699311365640865.jpg (9 KB, 350x215)
9 KB
9 KB JPG
>>102446558
I only use this to talk with my friends, Mr Shekelstein.
>>
>>102446599
>modern C++
see -> >>102441076
also rust core team doesnt even exist anymore
>>
File: stare.jpg (3 KB, 125x118)
3 KB
3 KB JPG
>>102441076
Don't be a faggot and use a for loop.
>>
>>102446658
>also rust core team doesnt even exist anymore

what happened? did they turn 30?
>>
>>102446679
the governing body was reworked and the core team itself wasnt really touchign the language anyway
>>
File: pepe-nervous.gif (1.35 MB, 493x498)
1.35 MB
1.35 MB GIF
>>102441089
Pure mental illness right there.
>>
>>102440994
Rust strikes me more like a subset of C++
It is complex yet easier to write well. Still C++ can do more and that's why people end up preferring it.

A better question is: Do you REALLY need either for your project?
>>
>>102446740
>Do you REALLY need either for your project?
C++ is just as easy to write as Python if you stick to standard library vectors and unordered_maps.
>>
>>102446697
>the core team itself wasnt really touchign the language anyway

so...what were they doing all this time?
>>
>>102446763
You won't be reaping the benefits of the language then.
>>
>>102441076
neat and all but can't you do this with just
 std::transform_reduce 
or
 std::for_each 
?
>>
>>102446868
dunno but that is how it was basically
>>
File: ez.png (206 KB, 668x2614)
206 KB
206 KB PNG
>>102446763
Is there a C++ solution for this that's as easy to crap out as the Python one?
>>
>>102441089
disgusting java dot chaining
>>
Which one would be better for learning good programming practices?
>>
>>102446930
If you have equivalent libraries already sure it’s a one liner.. what a dumb comparison
>>
>>102446697
Just trust me bro.
>>
>>102448341
you can go the website and see how there is no mention of anything about core anymore



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.