[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: 7382448181.jpg (17 KB, 474x294)
17 KB
17 KB JPG
i seriously don't see any reasons of using Rust over C++.
>>
>>93642904
Good for you. I have the opposite opinion.
>>
less flexibility means more cohesion to best practices, supposedly
not a new concept but maybe it will work out
>>
>>93642994
Your opinion is invalid. Mine is valid.
>>
Writing truly safe and portable C++ code is 2023 will make you want to kill yourself. Modern C++ is by far the most bloated and disorganized programming language to ever exist. I'm all for anything that can finally kill it.
>>
>>93643117
You will never be valid.
>>
>>93643339
>C++
>"bloated"
Lol. Lmao, even.
>>
>>93642904
>he doesn't know why C++ was even made in the first place
harmful.cat-v.org/software/c++/I_did_it_for_you_all
>>
primary reason to use Rust:
>it's the superior language
primary reason to C++ instead
>you have no desire to become a woman

tough call desu
>>
>>93643567
It is true indeed.
https://build-bench.com/b/WfuR5KZvB6PPHgAZrEYU9dTDYp8
>>
>>93643567
What's so funny, Dr. Anon, PhD?
>>
File: 1660008479464248.png (25 KB, 667x709)
25 KB
25 KB PNG
>>93643779
0.12-0.25 seconds for the header with by far the biggest compile time impact doesn't seem too bad.
>>
>>93643867
It only adds up retard.
>>
>>93646953
You only need to compiler once it really don't matter if it takes 8 or 9hours
>>
>>93643779
now compile in rust.
lol lmao
>>
>>93647072
>>93647118
>>
>>93642904
Cargo.
>>
Modern C++ is amazingly useful and safe but the majority of learning resources online only barely cover anything newer than c++ 14. Its a travesty.
>>
>>93642904
What are your gripes with C++? (You must have some, all great C++ programmers have many.)
>>
>>93642904
>>93643117
>nocoder has opinion
im sure your fizzbuzz uses all the MODERN C++ (TM) academic bullshit hacks possible and youre very proud of it, good for you!
>>
>>93643339
this guy actually knows what hes talking about, probably from experience
>>93643567
this guys is a nocoder zoomer that never wrote more than 100 LoC in a single project in his life
>>
>>93643567
Stroustrup was already calling it bloated back in '94 and he should know
>>
>>93643339
this
>>93643567
nocoder
>>93642904
More handholding (sometimes too much) to guarantee memory safety at competitive if not better execution speed
>>
>>93647807
std::vector is not safe.
>>
>>93643339
This is false. Writing modern C++ feels like any other high level application language, except you have facilities for fine grain control when you need it. Writing safe code is trivial.
>>93643567
This is true. With c++ you only pay for what you use.
>>
>>93650691
>With c++ you only pay for what you use.
Do you? See >>93643779
>>
File: 9k=.jpg (6 KB, 225x225)
6 KB
6 KB JPG
>>93643779
Let's see Rust compile time.
>>
File: NPC_wojak_meme.png (17 KB, 200x198)
17 KB
17 KB PNG
>>93650871
scripted NPC response, just like >>93647118
>>
>>93650885
It hurts, right? Knowing that even the shittiest c++ implementation is way less bloated than your babby language.
>>
>>93650904
rust is just macro, cope harder.
>>
>>93649088
Not him, but the whole thing about rvalue references and forward is a giant incomprehensible mess
Nobody outside of some compiler writers know the exact rules of when && is a rvalue ref and when it's a forwarding ref.
>>
>>93650979
>cope harder
It seems you're mistaken, it's not your preferred language that is widely used by a plethora of platforms.
>>
>>93650992
cope
>>
>>93650904
>but muh Rust tho? what about Rust?? Rust! RUST!!!
>>
Cargo shits on whatever shitmake/shitson/shitonan/shitcpkg Shit++ has to offer.
>>
>>93647807
>Modern C++ is amazingly useful and safe
Is it REALLY though?
>>
>>93643779
>>93650715
>Do you?
Yes. Lol nice shill pic. You’re #including <algorithm>. Each standard offered more functionality in that library, cpp20 offered much more. No shit the compile time increased by a few microseconds. Learn how compilation works.
>>
>>93651149
> You’re #including <algorithm>
Yes and? I'm not using it, why am I paying for it?
>compile time increased by a few microseconds
includes overheads are multiplicative
>>
File: 1669565448345977.png (67 KB, 597x574)
67 KB
67 KB PNG
If you want to make a political statement, that's fine. Make a party.

But don't masquerade it as a programming language and don't flood the board with retarded flamewars that are secretly just postmodernism-masked-in-a-programming-language.
>>
>>93651166
You are using it. Like I said, learn how compilation works. #include <algorithm> is a preprocessor macro for “copy and paste all of the code from that file into this file.” It’s there for convenience. And besides, preprocessor macros are not even apart of the language. If you are worried about a few microseconds then place exactly what you need and nothing more in your own file and include that. This is a very common practice in the embedded world.
>>
>>93651285
>You are using it.
No I'm not. This is not up for discussion.
>>
>>93651100
the solution to that is to not write retarded code that returns stack allocated variables.
>>
>>93651304
>C++ is safe now
>gets shown valid and safe C++ being unsafe
>C++ is safe if you remember to write safe code
lmao
>>
>>93651323
C++ is not a language for retards, that is true.
>>
>>93651330
Thanks, I'll keep using Rust while you LARP as le epic C++ programmer free of mistakes.
I like being practical.
>>
>>93651301
lmao rust tranny got BTFO
>>
>>93651380
Why do you pretend to hate trannies? So weird.
>>
>>93651339
Not writing retarded code is begin practical, but i don't expect a rust tranny to understand that.
>>
>>93651397
>Not writing retarded code is begin practical,
People don't make mistakes intentionally.
I do not expect NPC bots to understand what a human error is, however.

I like how throughout the history we have been refining our tools to be more predictable and fault tolerant but suddenly in 2023 a group of special snowflakes decide to complain about engineering advancements. Luckily these people are a vocal minority who do not matter, and never relevant outside contrarian culture imageboards.
>>
>>93651441
>Luckily these people are a vocal minority who do not matter, and never relevant outside contrarian culture imageboards.
So shills like you are paid to come here everyday nonstop and promote rust to a bunch of irrelevant people who don’t matter? Okay, got it.
>>
>>93649088
with 2-3 actually useful features, tons of useless shit added each standard revision
>>
>>93643779
>include <algorithms>
Nice try faggot.
>>
>>93651441
That is true. I didn't think of it that way. I guess I just don't want my skills to become invalid. I know C++ will be around for long enough for me to die and way longer than that, but it is just scary I guess. I don't hate Rust. I'm just a bit sad.
>>
>>93650885
Weird how you won't just post the stats, if you were actually confident in yourself that would be a great BTFO.
It's almost like you're just a trannoid coping
>>
>>93642904
because you don't use c++
if you had to use it, you'd know
t. c++ Qt wagie
>>
>>93650871
Rust compile time is slow. Honestly, who cares? it just isn't that big of a deal. Unless it is, and your job requires you to compile Rust, in which case solutions exist. Maybe try sccache. but most of us don't even have jobs. So who cares moron?
>>
>>93652384
>Qt is representative of C++ as a whole
Lol, lmao even
>>
File: 1667736273984097.png (385 KB, 554x554)
385 KB
385 KB PNG
>>93652418
>God look how slow C++ compiles
>how fast does Rust compile?
>um actually sweaty, compile times don't matter
>>
>>93652442
I never said anything about compile times for either language, because neither matter. I'm waiting for you to come up with a good argument against Rust. Want to try again?
>>
>>93652557
Want to try reading the reply chain you inserted yourself into, you fucking buffoon?
>>
>>93642904
https://vocaroo.com/19LVvkuHAPRH
>>
>>93652567
I already did. I'm not the person that said anything about compile times. I'm still waiting for that good argument against Rust, by the way.
>>
>>93652657
Why would you reply to a conversation specifically around compile times to post about how in the case of Rust it does not matter?
I think you're just retarded
>>
>>93652421
that's part of the problem, or at least a symptom of it
the language is so large that sublanguages have spawned within it: UE C++, Qt C++, etc,
each with their own quirks, build systems and best practices
>>
>>93652666
You said it yourself. Because it does not matter. You can't go 5 minutes without calling someone a tranny and you can't even come up with a good reason to avoid the tech you advocate against. You are a huge pussy.
>>
>>93652744
Your argument changes post to post, do you actually have any opinions or beliefs on anything?
>>
>>93652754
My argument has no changed. My argument at the start was "compile times do not matter" and that is still my argument. I have other things to do, let me know if you can come up with that good argument against Rust.
>>
File: 1667225693350613.png (228 KB, 1000x1000)
228 KB
228 KB PNG
>>93652863
>I have other things to do, let me know if you can come up with that good argument against Rust.
I often wonder if people who post shit like this realize how transparent they are, you're fooling precisely nobody
>>
>>93651323
You write like a functional-fag, and in an obfuscating fashion too.

>gets shown valid and safe C++ being unsafe
It's not valid. Compilers can catch the problem with -Wall -Werror, but that's my only gripe with C and C++ as of now, that obvious undefined behaviors are only diagnosed as warnings instead of errors. But vendors in committees don't want their legacy code to suddenly not compile anymore, so just be smart and alias cc to cc -Wall -Werror.
>>
>>93642994
Some reasons for C++ over Rust:
>1. Sheer quantity of C and C++ libraries. If you have a JOB, this is very big. Maybe not for your unemployed nigger ass.
>2. History, large amount of help on the internet and constant discussion on best practices and how to improve future C++ releaes.
>3. Good ptr managament. Use shared_ptr when you want to pretend you're using a GC language, and directly manage ptr lifetime when needed.
>4. Familiar syntax: so many fucking languages are based off C's style.
>5. Modern C++ releases fix most gripes with the language. >>93643053

Get real, faggot.
>>
>>93652912
>Compilers can catch the problem with -Wall -Werror
Anon... there is a very good reason that the industry is ditching C/++.
>>
>>93653555
>>1. Sheer quantity of C and C++ libraries. If you have a JOB,
If you have a job you are using nodejs, not C and C++. Plus Rust has first class bindings to legacy APIs like those.
>2. History, large amount of help on the internet and constant discussion on best practices and how to improve future C++ releaes.
Most of these help transfer over to any language including Rust.
>3. Good ptr managament. Use shared_ptr when you want to pretend you're using a GC language, and directly manage ptr lifetime when needed.
Good thing Rust is not a GC language.
>4. Familiar syntax: so many fucking languages are based off C's style.
nocoder problem
>5. Modern C++ releases fix most gripes with the language.
lmao not even close

>Get real, faggot.
All the "reasons" you posted sounds like some novice programmer blabbering.
>>
>>93652256
What do you mean? Where is the so called "zero cost abstraction"?
>>
File: 240y3z4c3exa1.jpg (43 KB, 648x625)
43 KB
43 KB JPG
I've only seen beginner/pre-intermediate programmers worship C and C++ in this board. All the arguments for C++ are so... basic and superficial.

Is C/C++ a phase?
>>
>>93652442
>God look how slow C++ compiles
That's not what the graph is showing. The graph is showing C++ build times are getting significantly worse over time at each updates.
Why are C++ fanboys so retarded?
>>
>>93651100
Wtf
>>
>>93654061
If pust compile times are so long with the language being new, imagine what they will be in a few years.
Why are pust shills so retarded ?
>>
>>93653709
> If you have a job you are using nodejs
Get a load of that unemployed guy.
> Most of these help transfer over to any language including Rust.
Most of what? Years of resources and knowledge helping transfer to a language that is not even ready for production? Are you retarded?
> Good thing Rust is not a GC language
Learn to read.
> nocoder problem
Yes, rust is for nocoders. Software developers are using familiar languages that don't throw out years of their experience.
> lmao not even close
We accept your concession.
> All the "reasons" you posted sounds like some novice programmer blabbering.
You already outed yourself as an unemployed nocoder.
>>
this is an anonymous imageboard so you can't see any names or identities, but once you go to discord or IRC, you will find out that people shilling R*st are either non-programmers or really horrible script kiddies who suck at engineering
>>
>>93653555
You forgot one of the most important things. There are two platforms: those which have a C compiler and those which don't matter. Most platforms that have a C compiler also have a C++ compiler, not all, but many. While Rust is stuck with LLVM faggotry.
>>
>>93643339
As a past colleague of mine said: If I need performance I write it in C and if I don't then there are many high level languages out there that are better than C++. If I need both then I just call into C.

With C and at the same time Python, Java (pls no), C#, Erlang, Rust, Nim, Go existing there is no need for C++.
>>
>>93656088
Your colleague is a fag
>>
>>93656372
He at least has a job unlike you.
>>
>>93642904
both are huge memes
>>
>cant X & MASK == Y without parens
>cant unicode
>cant field in enum
>cant pattern match
>cant first class tuple
>cant first class array
>cant proc macro
>cant slice
>cant use before declare
>cant declare less than twice
>cant Self
>cant move by default
>cant break value;
>cant ?-implicit control flow
>cant #[derive(Default)]
>cant #[derive(Serialize)]
>cant #[derive(Debug)]
>cant block {} expression
>cant macro newline without backslash
>>
>>93659376
all are downsides and promote bad coding practices unironically
>>
>>93659505
>move by default promotes bad coding practice
Every single C++ shills are nocoder brainlets who will never go beyond fizzbuzz.
>>
>>93655568
>> If you have a job you are using nodejs
>Get a load of that unemployed guy.
Imagine the irony lmao. This is what 4chan bubble does to your brain.
>>
>>93659505
do you even know what a slice is you fucking monkey? go suck on a coconut and keep plating your spaghetti monsters
>>
>>93659700
this so much they say they know c++ and dont know what an rvalue reference is absolute monkeys
>>
While both C++ and Rust have their strengths and can be used to accomplish similar tasks, there are some notable advantages Rust offers over C++, especially in certain contexts. Here are a few reasons some developers choose Rust:

1. **Memory Safety**: Rust guarantees memory safety without requiring a garbage collector, which is an advantage over C++. Rust has a unique ownership system that eliminates data races at compile time. This leads to fewer runtime errors and generally safer code.

2. **Concurrency**: Rust has first-class support for concurrency and distributed computing, with language features designed to prevent common mistakes with shared mutable state. This can be very advantageous in modern multi-core and distributed computing contexts.

3. **Interoperability with C**: Rust provides a high degree of interoperability with C, enabling developers to leverage existing C libraries and systems directly.

4. **Predictable Runtime Behavior**: Rust doesn't have a runtime or garbage collector, leading to more predictable performance characteristics, similar to C++.

5. **Package Manager**: Rust's package manager, Cargo, is considered to be one of its strong points. Cargo makes it easy to manage dependencies and build and test your projects.

6. **Modern Language Constructs**: Rust incorporates modern language features like pattern matching and type inference, which can lead to cleaner, more readable code.

7. **Strong Community and Growing Ecosystem**: The Rust community is renowned for being particularly friendly and helpful, and the ecosystem is growing rapidly with libraries for many common tasks.

8. **Focus on Zero-Cost Abstractions**: Like C++, Rust aims to provide "zero-cost abstractions," meaning that high-level code should compile down to machine code that's as efficient as equivalent low-level code. This can make it easier to write high-level, abstract code without sacrificing performance.
>>
>>93659769
Based. C++ co-routines are a disaster.
>>
>>93659769
predictable runtime behavior is literally the same as c++ and not an advantage

modern language constructs is #1 though
>>
when it works, it does work very well, but to get to that point, you'll go down a mental well
>>
>>93653648
C++ sisters.... not like this...
>>
>>93655404
>pust
This feels just as dumb as it did when "Drumph" was a thing.
>>
>>93653648
Wait, it didn't catch it? Are you saying that anon... made some kind of mistake? Like a human error, one might say?
>>
>>93655404
The compiler is slow, all else is good. Did you expect EVERYTHING to be good? Who's the monkey now?
>>
File: dang.png (85 KB, 1303x429)
85 KB
85 KB PNG
>>93653648
This would happen if you stopped writing niggerlicious code, as I said before.
>>
>>93655404
If seeples is almost 30 years and no one tried to optimize it in this time, imagine what they will be in a few years. Why are seeples fags so retarded?
>>
>>93660505
Anon made an error but also enabled all error detection, but the compiler failed.
If you’re saying detecting such lifetime error is out of the scope of that flag then that’s wrong too as demonstrated by >>93662918
It’s fair enough to conclude that the -Wall is useless as it can’t detect all lifetime errors.

If you’re defending this you have a severe cognitive bias.
>>
File: 1544115371742.png (820 KB, 640x640)
820 KB
820 KB PNG
>>93653648
>auto
>auto
>auto
>>
C/C++ users on this board are the most intolerable, bar-none.
>>
>>93663386
>C/C++ users
You must mean Rust shills
>>
>>93663430
No
>>
File: dang_clang.png (83 KB, 926x692)
83 KB
83 KB PNG
>>93663361
>>93662918 shows that the diagnostic about dangling reference is raised even without -Wall on gcc.
But (pic related) also goes to show that lifetime analysis is not trivial at all for compilers, but it's making progress: even with -fanalyzer, gcc doesn't catch the dangling reference in the lambda, whereas clang gets it right.
>>
>>93653555
1. True. However amount of libraries for Rust is growing rapidly because it's just so much easier to make and use them, incentivizing people to contribute by making new ones and wrapping C/C++ ones.
2. If you are good with either C++ or Rust, you can learn the other easily. They both are similar languages with similar usecases.
3. And so can you in Rust.
4. Rust is C-like as well.
5. Modern C++ is pretty cool. Sadly majority of C++ programmers simply suck and can't really comprehend the new features. And no amount of addition is going to solve the bloat problem.
>>
>>93663386
C++ and especially C programmers are fine as long as they don't talk about other languages. The sense of superiority leads to less experience with things beyond what they are familiar with, which in turn makes them come out as ignorant, sometimes even about the internals of their own favourite language.
>>
Rust shills are disgusting, who even care about safety lol, just release a patch and your vulnerability is a thing of the past
>>
File: 1519088557553.png (1.77 MB, 1440x848)
1.77 MB
1.77 MB PNG
C++ is bad because if you go out of your way to break it it is broken.
>>
>>93663386
This 2bh
>>
>>93659751
rvalue reference is expressly about moving temporary objects aka "when a move is indistinguishable from copying and destroying the original" and is not default behavior for anything that isn't a temporary object iirc. What's your point?
>>
>>93663686
You had my hopes up for C++ but nope, explicitly defining the return type as the original code has the very same issue as GCC in Clang.

Rust would be yelling from line 1. Seriously, not detecting lifetime issues like this is not acceptable in 2023. Bjarne wonders why Rust is the poster-child of safety. Someone should send him this picture in the email.
>>
>this thread again
Ada mogs both.
>>
>>93669009
>Ada
overcomplicated meme that nobody uses
>inb4 muh aerospace
maybe, in 80s, as experiment, failed miserably
>>
>>93642904
I don't see a reason to use anything other than assembly.
>>
>>93642904
you're not replacing C++ with it but it's apparently useful in shader programming
glsl and hlsl suck and have fuck all in the way of basic productivity features and you need to write your own extended compiler to do anything with them
>but-but shaders aren't supposed to be complex
this way of thinking is why people blame directx12 and vulkan for pipeline compilation stutters
the optimal way of designing shaders even for graphics pipelines as opposed to general compute nowadays is very few, very large, and very complex ones
>>
I was playing around with Zig yesterday and I must admit it was fun.
>>
>>93673092
zig considered harmful
http://www.gingerbill.org/article/2019/05/13/a-reply-to-the-road-to-zig/
>>
>>93659727
Only an unemployed nocoder would think employed developers only use nodejs.
This is what rust programmer cosplay does to your brain.
>>
>>93673159
ginger bill is a complete and total moron who barely knows a thing about plt
>>
>>93659769
What is this garbage? You advertise is as
> notable advantages rust offers over C++
but you keep mentioning things that rust is catching up to with C++.
> Memory safety
C++ does not have a garbage collector. It offers ownership system through smart pointers
> Concurrency
This sounds like a marketing peon wrote it after an actual programmer gave him a bunch of keywords. Most languages support concurrency. Was it comparing to Python?
> Interoperability with C
As opposed to C++? Bitch please
> Predictable runtime behaviour
C++ does not have a garbage collector. You are a retard
> Package manager
The only semi valid point. Conan, however, is close to Cargo
> Modern language constructs
C++ is more readable than Rust
> Muh community
Here C++ has a huge advantage over rust due to age. Rust got a lot of catching up to do
> Zero cost abstractions
Again with "like C++". Which language was this list written for?
>>
>>93673648
You literally just looked at the titles and ignored the explanations.

>C++ does not have a garbage collector. It offers ownership system through smart pointers
And so does Rust. However rust offers better memory safety guarantees because of borrow checker and embedding lifetimes within type system.

>This sounds like a marketing peon wrote it after an actual programmer gave him a bunch of keywords. Most languages support concurrency. Was it comparing to Python?
Go back to collage. Concurrency is a CS term and rust can do it safely because it tracks whenever something can be shared/send between threads in the type system.

>C++ is more readable than Rust
Pic related.

>Here C++ has a huge advantage over rust due to age. Rust got a lot of catching up to do
Doesn't change the fact that Rust community is pretty good.

>Again with "like C++". Which language was this list written for?
C++ doesn't focus on zero cost abstractions nearly as much as Rust. It doesn't even distinguish between atomic and non-atomic reference counting. Also printf is a great example of just how bloated some parts are. There is nothing zero cost about it.
>>
File: 1580626675206.png (315 KB, 969x2099)
315 KB
315 KB PNG
>>93673798
Pic related no pic
You won't find something this ugly anywhere in non-generated Rust code.
>>
>>93673798
I see you have problems with reading comprehension.
> And so does Rust. (...)
Then why did you mention garbage collection when comparing Rust to C++?
> Concurrency is a CS term(...)
There were many CS terms in that sentence. My problem with the sentence is that it reads like a marketing blurb full of keywords but otherwise lacks substance.
> Doesn't change the fact that Rust community is pretty good.
But it does mean it's incorrect to bring it up as an advantage of Rust over C++. You will be shocked to learn that "advantage" means something is better than another.
> C++ doesn't focus on zero cost abstractions nearly as much as Rust.
See, I could give this sentence some thought and maybe even agree with you, but you completely ruin it with:
> printf
Which is a C function you absolute waste of time. You clearly have no idea what you are talking about. This explains your idiotic list of "advantages" you mindlessly pasted from somewhere else and changed the language to "C++".
>>
>>93675317
>Then why did you mention garbage collection when comparing Rust to C++?
I didn't. You were replying to chatgpt on first. You fixated on borrow checker which clearly was just a filler and ignored the other part which was the actual argument. AI is not that smart and sometimes says things that make sense locally but not in greater structure.

>There were many CS terms in that sentence. My problem with the sentence is that it reads like a marketing blurb full of keywords but otherwise lacks substance.
Just because you can't understand it doesn't mean it doesn't make sense. I even tried to dumb it down for you but you still can't digest it. Best I can do is direct you go read about. concurrency and how exactly Rust approaches it. There is a significant difference between C++ and Rust here.

>But it does mean it's incorrect to bring it up as an advantage of Rust over C++.
Having good community is an advantage. The age doesn't really determine quality of a community.

>Which is a C function you absolute waste of time. You clearly have no idea what you are talking about. This explains your idiotic list of "advantages" you mindlessly pasted from somewhere else and changed the language to "C++".
And it's also part of C++. How else can you do formatted printing in C++? Is it actually zero-cost? How does it compare to Rust's formatting?
If you are familiar with C++ internals I would love to hear about it.
>>
>>93675899
>borrow checker
Garbage collector*
>>
>>93642904
>JUST
use whatever language has appropriate libraries, tooling, support, for whatever you're intending to make
aka use Rust anyways and condemn yourself to reinventing the wheel and using FFI wrappers to C
>>
File: 1464749276000.gif (3.61 MB, 444x250)
3.61 MB
3.61 MB GIF
>>93663386
Rust trannies and web devs are the most intolerable. C/C++ users dont even care about you guys cause we're actually doing work. You just cant stand that your language is frowned upon in the real world so you have to come here and project that your languages are real. At least C# users know their lane and leave well enough alone.
>>
>>93675899
std::format with an std::ostream or std::print with c++23?
uses the same style formatting strings as rust with compile time error checking, i'm fairly certain it was directly influenced by rust's fmt
>Is it actually zero-cost?
as zero cost as something like that can be, offloading the actual data-to-string routines to compile time isn't sane even if it's technically possible
>>
File: EahgaepUcAUMAue.jpg (79 KB, 599x449)
79 KB
79 KB JPG
>>93642904
>developing windows application
>installing C++ for use on vscode
>have to download msys2
>install it
>have to use pacman to install mingw
>same for gdb
>try to run it on vscode
>compiles to an exe that cannot be run
>checked the system architecture twice
>checked the environmental path variables
>checked the version
>can't find any error, neither does error message tell me anything
>>
>>93677750
did it say something like this binary is not made for this version of windows?
i ran into this for a while with certain combinations of flags when building debug builds using unstable versions of the clang windows toolchain
maybe gcc has the same stupid
iirc for me it had something to do with the debugger metadata format, explicitly adding -gcodeview fixed it

you should be using the llvm-project's native windows toolchain for windows development btw, not mingw/msys2
it replaces the whole toolchain while being completely compatible and better than MSVC
yes it does also require installing visual studio, the IDE, in order to get the SDK, and yes, it's bloated, most windows development related things are
it's still a better idea over all than going through mingw/msys2 and the MSVC STL is much more conformant than libcxx or libstdc++
>>
>>93673648
garbage collector is not end-all be-all of memory safety, it allows for errors that rust prevents
stop thinking memory safety = garbage colelctior
>>
>>93675899
> I didn't. You were replying to chatgpt on first.
Imagine defending a post made by chatgpt and being surprised when you come out sounding like an idiot.
> You fixated on borrow checker which clearly was just a filler and ignored the other part which was the actual argument.
Whatever dumb shit you got called out on was a "filler" and whatever was ignored was actually brilliant. How convenient.
> However rust offers better memory safety guarantees because of borrow checker and embedding lifetimes within type system.
It is different, not better. It is a lot more rigid compared to C++, where you don't have to give up safety because borrow checker can't figure something out.
> Just because you can't understand it (...)
No, it's quite clear you can't comprehend how a marketing blurb can only look to be smart. Stop being fooled by smart words.
> Best I can do is direct you go read (...)
And that's why people think you are a retard. You think "X is better at Y because go read about it" is an argument.
> Having good community is an advantage
But it's not an advantage OVER C++. Rust is still immature and does not have even a fraction of resources or community C++ has to offer.
> How else can you do formatted printing in C++?
std::format, which another anon already mentioned. From your pitiful display of knowledge and logic it's not surprising you criticize something you don't even know.
>>
>>93679208
read again and lurk moar
>>
>>93677524
>let me enter this thread and make a post ranting how I really, really, really don't care
>>
>>93643779
Now import algorithm as a C++20 module. Oh wait, you can't, because GCC is dogshit and doesn't support that yet. MSVC wins yet again.
>>
>>93651100
C doesn't have this problem.
>>
>>93679631
>Imagine defending a post made by chatgpt and being surprised when you come out sounding like an idiot.
Me? You were confused by the part written by bot, not me.

>Whatever dumb shit you got called out on was a "filler" and whatever was ignored was actually brilliant. How convenient.
I think you still don't fully realize I am not the poster you've originally replied to.

>It is different, not better. It is a lot more rigid compared to C++, where you don't have to give up safety because borrow checker can't figure something out.
It isn't different. Everything you see in C++ regarding memory safety is in Rust. And rust has some stuff extra.
You don't have to give up on safety if you are competent. Struggling against borrow checker is a common symptom of being new to Rust.

>No, it's quite clear you can't comprehend how a marketing blurb can only look to be smart. Stop being fooled by smart words.
Yet you can't criticize it any other way than to call it blurb. You can't reply so you dismiss it as irrelevant.

>And that's why people think you are a retard. You think "X is better at Y because go read about it" is an argument.
I did explained it how does it archive better thread safety by encoding whatever a value can be shared and/or references across threads within the type system. If you can't understand any of this you can ask, but if you just give up altogether best I can do is just direct you to read about it yourself.

>But it's not an advantage OVER C++. Rust is still immature and does not have even a fraction of resources or community C++ has to offer.
On the other hand majority of these resources are outdated and don't follow good practices of C++.

>std::format
Yeah, I'm not completely up to date with newest C++ stuff. That's why I asked about more details. Especially about it's internals. Parsing of the format string seems to be done in runtime right? That doesn't sound very optimal. Does compiler optimize it out in compile time?
>>
>>93673302
LOOOOOOOOOOOOOOOOOOOOOOL
This nocoder fizzbuzz artist thinks JS isn't the most in-demand programming language in the industry LMAOO

Go back to your desktop tinker tranny thread freetard cnile faggot. You will never make it.
>>
>>93680337
C is not a relevant programming language. Its compiler itself is written in C++.
>>
>>93680609
> I think you still don't fully realize I am not the poster you've originally replied to.
So you insert yourself into a conversation and argue against a point made in context. When called out on being a retard you claim that you are not the original poster and are not arguing within that context.
Your existence is a waste of time and oxygen.
>>
>>93680800
> JS 67% - not 100%
> C++ 20% - not 0%
> C 16% - not 0%
thank you for proving my point. now go commit sudoku
>>
>>93673648
>It offers ownership system through smart pointers
Rust does not have a GC either but that's an opt-in feature, which defeats the purpose. Owenership should be enforced by default and Rust is better for that. Any heap allocated objects have to follow a single mutable ownership model, which is what makes Rust safe.

> Most languages support concurrency.
Rust concurrency is far easier to use than C++20 coroutines.

> Predictable runtime behaviour
It means that Rust does not suffer from UB minefield like C/++.

>C++ is more readable than Rust
Not really, no. Both are similar but Rust is bit more clear because it has better and more modern abstractions than what STL has to provide.
>>
>>93680982
>a-atleast it's not 0%
Cniles are fucking hilarious LMFAO

Go back. You will never make it. Ever.
>>
>>93681050
Great goalpost moving. How far down this list Rust? Does it even show up?
>>
>>93681129
>goalpost moving
>move goalpot to Rush
LMAO
Get the fuck out of here cnile freetard. NGMI.
>>
>>93681243
What is the first post of this thread? Rust vs C++
Great goalpost moving.
>>
>>93656088
this guy gets it
Erlang/Elixir + C and you don't need anything else
why the fuck would anyone write high level logic in C++ is a mystery
>>
>>93681306
Then you came along and said
>Only an unemployed nocoder would think employed developers only use nodejs.
Go back to your containment thread.
>>
>>93642904
Well, Rust does have some nice features, I'll give it that much. The pattern matching and a sprinkle of functional programming that Rust takes inspiration from are wonderful to have, at least from my perspective. Also, Rust's type system, borrow checker and error messages are quite helpful, and now you also have gccrs frontend (although it's still in its early stages) if you don't want to use the baseline, LLVM-dependent compiler. It's not a bad language per se, I just dislike its community and the agenda behind it (although C++ started going down the same way recently).
C++, on the other hand, is just a bastardization of a language. It's a nightmare to parse (good luck writing a parser or a compiler from the ground up for C++), has 3 Turing complete languages embedded into it for some obscure reason and in general has a lot of quirks that make it more painful that it needs to be. Scott Meyers even said, during a D meetup, that C++ is just too complicated to be "fixed" at this point (https://yewtu.be/watch?v=KAWA1DuvCnQ, around 41 minute). It's not a terrible language, but it carries a lot of legacy that just can't be dropped. It'll probably end up like COBOL in the financial world if something doesn't happen.
And as for C, I just love it for its simplicity (it has quirks too, but the language itself is so small that you can quite literally learn it by heart).
In the end, these are just tools for a job. The choice is up to the programmer.
>>
>>93681515
which was a reply to
> If you have a job you are using nodejs, not C and C++.
don't procreate
>>
We use nodejs and C at my job, and sometimes C++ and C#
>>
>>93681819
So why hasnt a C+++ been made yet? Checkmate
>>
>>93642904
You can distill C++ to bare essentials and add C++ ranges on top and you have basically the same thing.
The issue still remains about "other people's code" which will probably suck.
And then there's template error messages... but if you segment your program well you will never have too much code to look through for a mistake. And with enough experience you just don't make mistakes anymore.
>>
>>93677524
>C/C++ users dont even care about you guys cause we're actually doing work.
Is that why /g/ larpers make 15 threads a day seething about rust where it is barely anywhere to be mentioned?
>>
>>93682337
I assure you the rust hate is being made by rust users themselves to fake shit
>>
File: full_us_2023-03.png (167 KB, 744x873)
167 KB
167 KB PNG
>>93680800
that's an opinion poll
here are the hard facts
>>
File: 1561838923720.jpg (254 KB, 850x1203)
254 KB
254 KB JPG
>>93682697
>python and java still so high

Ugh. Ive been wanting to take up python to increase my repetoire, but it's so easy and yet so shitty of a language, too. But companies are paying out the ass for it, as well.
>>
I just use haxe
>>
>>93681819
Cool video, thanks for posting it.
>>
File: 35897538959.jpg (72 KB, 804x492)
72 KB
72 KB JPG
>>
Rust has some great features, but I always feel like I'm fighting the compiler when doing things that should be straight forward in almost any other sane language due to its weird generics.

Also rust devs have a tendency of making really horrible looking barely readable code.



[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.