So why would I pick C++ over Rust? Seems like what C++ attempts to do with "Modern C++" is already implemented in Rust...

So why would I pick C++ over Rust? Seems like what C++ attempts to do with "Modern C++" is already implemented in Rust, but not as an after thought.

Other urls found in this thread:

transitiontech.ca/random/RIIR
github.com/gfx-rs/gfx
pastebin.com/jz1rMzMt
claylabs.com/clay
pastebin.com/TAXX0SVT
htwins.net/unicrush/
twitter.com/SFWRedditVideos

C++ will still be around in 10 years

And that is really sad

While Rust does a lot of things right that C++ doesn't. Its attempts at keeping itself safe makes things like globals require libraries and tons of extra work, while in C++ I can just do "int number = 0;" above main. Rust may help with large multi-threaded programs, but C and C++ are the kings of simpler things.


Actually kill yourself.

Also, to continue my argument, C and C++ have large amounts of libraries that can be easily used with them(though I'm pretty sure rust can interface with C libraries(right?)) many of which have large communities and are actively developed. While libraries may not make a language, they certainly help it keep it's prevalence.

Program with your own semen for all I care. What you choose to make your shitty code with is not my business.
Why would you want to poz yourself?

Why would you have globals? There is no excuse except laziness.

C++ is well established, has tons of libraries and is compatible with C code. It's the Windows of programming languages.

I like to store config values in them. Both static and ones that I get at runtime after reading arguments and/or config files.

C++ programmer here. That's bad code.

that's hardly unique to C++

Because Rust doesn't work. Measure compile time as a Rust project grows and you'll realize that Rust is for toy projects only.

No it isn't, but it is true.

You pass around tons of variables rather than just define them?

It depends no the scale and topic(s) of your project.

The sum of all knowledge about C++, development with C++, and its tools is enormous. Rust is growing and have some (fixable) problems. Its libraries and tools may not be as developed and battle-tested, or not exist at all.

I don't know about Rust, but C++ has insane compile times once your project gets big. If you are using templates heavily, then you are in for a treat.

Are you one of those singleton advocates? You are unable to create one object and then give that object to all other objects that wants it? We must be sharper than that, because that is LAZY and setups for code that is difficult to test.

Guess I will be using Rust, then.

Accordingly to the optimization level. I don't know if rust does better Clang or evne g++ at this point.

Can you write a d3d9 hook in rust?

That's probably the biggest benefit for C++ right now. Depending on the project, the libraries for C++ may just be better than current Rust libs (if they exist). You could still do the project in Rust, but you'd have to write the libraries yourself and it would take longer. That may or may not be alright, depending on the project.

Pick Rust user. Why would we give a shit what you do with you're life?

You pick C++ because you have to, for instance when you have to maintain/modify an old C++ base.


Stop this meme, it's not source-compatible and just about every language has a C FFI.
>b-but it's almost source compatible
Either it accepts everything C or it doesn't. There is no almost compatible. Are there almost virgins?

When something works 99% of the time with very narrow exceptions, saying it doesn't work all the time is both technically correct and entirely besides the point.

Redefining "a clock works" to "a clock shows the correct time at least twice a day" doesn't make the useless trash heap you call a clock any less of a useless trash heap or any more of a clock. It is very efficient at nourishing the delusion that you know the time, however.

Tell me, what is "the point" of C compatibility? Apparently it is not the fact that you could compile any C with a C++ compiler. I really wonder if you complain about broken software on here; your attitude is what creates it.

You're being quite disingenuous user.
You bloody well know you can compile a ton of C with C++ compilers and that migrating C code to a C++ codebase is much helped by the fact that one language almost encompasses the other.

This is the point: when your C code needs C++ features you can painlessly use them without rewriting the whole thing and that's one of the big reasons people associate the two.

Your analogy is also a very faulty one and quite ironically so, no clock is 100% correct, all clocks deviate from standard time slightly and as long as you know the limitations of your clock in terms of precision you can use it as if it were perfect. Just as you can compile C code as C++ so long as you know the unusual couple of cases where it won't work that are easily fixed.

pick Go

TEMPLATES
E
M
P
L
A
T
E
S

It's you who is being disingenuous by downplaying the supposedly small incompatibilities.

Does the C code declare some variable/member called new? Oops, it's not compatible. Oh, it's in a header file which is part of a public API? Looks like you're out of luck. Fucking C programmers, they shouldn't have used things that are illegal in our "superset" of C in the first place!

Does the C code use implicit pointer casts, like people usually do with the return value of malloc? Nope, incompatible. Stupid C programmer, why doesn't he follow the conventions of C++? Amazing about this bit is that C++fags occasionally try to convince others that an implicitly casted malloc is bad style. Because when you break something in your "compatible language", obviously the other party is at fault.

Compatibility remains a binary thing, but even if one were to accept your braindead redefinition, you are still wrong. While I don't want to get too hung up about details of an analogy (since clearly, you realize the point was about redefinition of desirable states rather than clocks), it actually fits your reply: The deviation of this particular clock is anything but slight.

HERE'S THE DOOR

Then I guess we will just agree to disagree.

I've done quite a few migration from C codebases into sepples over the years and I found all those issues to be easily fixed. I don't think we disagree on the facts, since i gladly concede that C++ isn't technically compatible with C. However you can't deny that porting to C++ from C is easier than to any other language, which is why it's "more compatible" than any other.

I'm not at all trying to redefine shit. Stop getting mad over nothing, C++ is not a superset of C. But compatibility is a spectrum, and it's more compatible than any other language so saying it's NOT compatible is both technically true, and irrelevant because nothing is technically compatible with C besides C and early C++ standards.

Unless your claim is that it's not easier to port C to C++ than any other language and then you're just a moron, but I don't think so.

The biggest reason to stay away from Rust is that it's not really a good system language, but instead SJW-infested piece of STEM propaganda. So unless you wear problem glasses and skinny jean, suck cock for a living, and maintain a strong tumblr following, it's best avoided.

If you just hate C or C++, but want to do systems level stuff, then work with D. Rust is shit.

Rust's focus on safety is a reflection of the millenial developers demand for safe spaces. The world (computer) is too dangerous and must be made safe!

We disagree on one fundamental point: That compatibility as a spectrum is in any way meaningful. It isn't, and yes, you are redefining shit this way.

Taking your word for the compatibility between early C++ and C, this is self-contradictory. All the extra work you describe (superficially; you have not yet considered an API that is no legal C++) would not have to be performed in early versions of C++. You wouldn't even have to think about these issues. How is that irrelevant when these issues include problems that are not solvable without breaking everything?

Number of technical or even technico-political arguments: 0
Number of shilling opinions about how "uncool" it is: 7

You could at least have mentioned the pre-optimizations compile times don't you think?


Yes, better leave a few hidden bugs so that NSA always have a fresh backdoor available amr?

You don't have to, but this is trivial since C with Classes was, well, C at some point.

Right, so all fluff aside this is our main point of contention.
My thesis here is that since C++ is closer in terms of syntax and features to C, to the point a lot of their functionality is, for historical reasons, identical; it is therefore less time consuming to port C code to C++ and thus in that sense, C++ is more compatible with C than any other language.

Other than that well if you disagree on my usage of "compatibility", you are free to open your dictionary, since i do not mean it in the sense of technical compatibility but in the more common usage of *compatibilis*.

But since this argument is going semantic, I pledge we stop, since we won't discover anything interesting and it's all too silly since we agree on the facts.

Neither.

I suggest javascript instead.

If you use Rust you are an enormous faggot who doesn't know how to do anything other than write shitty code in a meme language. That means you're shitty at programming and just trying to be different by using Rust.

Being shitty at everything you do while still trying to be "different" and "unique" from everyone else is the DEFINITION of being a hipster.

SMH TBH FAM.

javascript is the definition of a meme language.

90% of rust users are javascripting sanfran webdev fags

doesn't seem to be the case.
fuck off with your meme language, thanks.

...

samefagging doesn't mean you're right
fuck off back to /g/

Efficiency. Not everyone has unlimited time to endlessly bloviate to their colleagues about best practices, and some projects just need to get booted out the door quickly. If you'd ever actually been paid for your code, you would realise this.

Just use ocaml faggot

ah yes, because Mozilla is known for their vast javascript repositories
not javascript

why don't you faggots actually bitch about something real, like pre-optimization compiling times.
at least then you'd have a point, instead of bitching about "muh javascript programmers."

Rust is marketed as a safe system programming language, but if you do serious system programming, you'll end up needing to write unsafe code anyway. If you only knew Rust beforehand, then you will have learned more about how to fight the shitty borrow checker than about how the actual machine works and you would be hopeless in such a situation. There is value in a language that doesn't treat you like you're a child and instead forces you to develop real knowledge and critical thinking skills (although, I suspect that most of the SJW hipsters who infest Rust's community do want to be treated like children).

Sorry your shitty meme-lang is filled with shitters, faggot.

Who is involved in "handlebarsjs" on the team? What?
None of this really matters, even if it were correct, because you don't have an actual argument concerning rust. You just shitpost about identities and even ignore the simplest things to bitch about.

You're garbage that needs to go back to /g/.

you just a snookiposter faggot

You're just a fucking retard that needs to go back to /g/.

that's why you a snookiposter

The comparison between C++ and Rust is an insult to C++

Enjoy your SJW-infested shit language

On second thoughts, kill yourself.

What does it matter if I am just using a programming language? Would you stop using C++ if it was SJW-infested?

Of course I would. My programming language defines my identity, it's how I know whether I'm cool or not.

New, Untested, Mozilla
Old, Performance, Bearded guy

How embarrassing would it be if my friends saw such an uncool language on my GitLab.

...

I dont know, ive been having the same problem.

rust seems new and interesting, the sjws are a minor nuisance for me as i have no online presence and dont get into language communities, unless they are tiny.
But the language is sort of too new and immature to tell if it will be used and that is kinda important to me.

C++ is old and battle tested but the problem for me is that its too huge. it seems insurmountable that i could even try to learn the language. and modern C++ standard seems to progress sooooooo slowly.

You're so intellectually dishonest it's getting me mad. In C++, I can easily include a C header and get working using that library. Saying that isn't in any way unique is like saying the you can include C headers in ruby. Most languages cannot _DIRECTLY_ use C code. Also, your analogies are shit.

that*

Every language with an FFI has been able to do this for decades. In fact such languages can do it better. If the header contains something incompatible (I've given an example in this thread, nobody considered it so far), you are fucked with sepples. Your next post will contain a definition of direct use that is satisfied exclusively by C++ but has no real-life application.

No

ITT: worthless meme-driven development paradigms

Because if you depend on them they have you by the balls. People learned this the hard way with Java. That's why SJWs gravitate towards languages and platforms, they want power.

Object oriented programming is fucking shit.

Use C and fuck off with your hipster shit.

C lover here. Genericity is more desirable than OO.

There's a keyword in the language for it smartypants

Rust is not pretending to be a fucking OO language. It's more like C with some features adopted from Haskell, plus some unique shit that (currently) makes it the one in its class.

doesn't matter what language is better by itself, java proves that.
there are more matured libraries written for C++ than for rust.

have fun writing complicated things like game engines with structs

lmfao nobody uses OOP for writing game engines.

if you really think this you are either retarded or you don't know what you are talking about

He found a time portal to the 90's yet still manages to be an eternal septemberfag

You are so completely wrong it's hilarious.

suck my nuts grandpa

Neither, both are shilled heavily for the wrong reasons, Holla Forums is known to harp on shitty threads. Meanwhile programming threads that actually fucking matter, like C and Go are dead in the water.
Else see this:

And this.

Non sequitur, m8.

Get a brain moron. Game engines are famed for not using OOP at all that's why it's so "hard" to get into that industry for an average pajeet shitter like you.

The game engine writing industry?

lol what do you think the games industry does?

The vast bulk of it? Licenses engines and spends $$$ on graphics artists, voice talent, mocap, storyline scripting etc

Bullshit. Older game engines or ones dominated by old school ostrich leads maybe. But plenty of new game and physics engine code uses C++ classes w/ OOP techniques extensively, even exclusively. Bullet, Ogre, several others. Not many engines can claim to have won an Oscar. Bullet with it's C++ OOP can.

Additionally, well-written generic code in C++ using templates is often the fastest code out there if complex, disparate data must be munged together into cache-friendly, efficiently stridable memory layouts. Again, very often it's the highest performance code there is--and types are deeply ingrained into template metaprogramming.

So yea, no. You might be able to practice C fanaticism on cuck/g/, but here--not so much.

One other thing, since OPs topic isn't game engines, but why C++ vs [latest SJW language du jour]? I'd also point out that creative coding--which has many of the same requirements as game development work--is exclusively OOP. For example, Cinder.

Whether an engine is OOP or not has a strong correlation to how recently it was developed. Not by the implication it's inferior to archaic C techniques.

Makes games using engines. Not making engines.
Dumb nigger.

hahaha oh wow

you're riding the bloat=bad train too hard

Do you even WANT to get a job?

OOP has been in engines for a while now. pajeets don't need to make game engines at all, and most people in the video game industry don't work on them either. essentially all 3D engines were forked off of an idTech engine, nobody reinvents the wheel, its not worth the time.

Here's a disturbing meme... transitiontech.ca/random/RIIR

Doesn't Rust have all the same problems as Go? I mean, it was designed to compete with Go, after all.

Maybe? Theres a dx11 hook in this: github.com/gfx-rs/gfx

It wasn't.
And even then Go's main problem is the GC which Rust doesn't have for obvious reasons.

c++ was not created by saws

No C-style for loops. It seems like a little thing, but if you understood the pain of using languages that don't have them for programs where you need them, you'd refuse to use them too.

...

this entire thread proves beyond doubt that Holla Forums is good for nothing but shitposting

C is the bwst programming language ever. It is such a good programming language because it has statememts like the go-to goto statement thid this is what makes it so fun to use! I like t o programin in c and use the go to goto stamtennt when writing my col cool programings ok ? First of all C is was was awesome ok. C is fun to write programs with because first of all C is the most important programming language in the world! Every computer ises uses C because guess what C can do what nothing else can that is what makes it so special. First of all programming languages, some programming langauges that are not C are stupid because firsr of all the yare not C ok. EXcept for FORTRAN which is not a bad programmers language either? So why is C the greatest programming language every made? First of all C is not just a programming language it is THE Porgmgraimming language that only reela programmingers use ok. Only real programmiers us e C becauese it is so awyesome. Secpmd pf a;; all C has the best syntax of any programming language v ever MADE ever because q j guess what every other pgroaminng language after C ( All of them) copied its siyntax because the ppl who people who wrote the GENIUSES that wrote C were so awesome and cool that they git got it ewrite the first time! and that is whzt ywh why ae everyone bcopied them . Because htey have no talents like fucking have no idea who how to make a programmering langauge because they arent smart like the person who write C! C has such a fun syntax to write C in lik e I like how it has { } brackets which makes the SCOPE byut we will talk about that later ok. So First of all C has amazing programming language features like MALLOC, like GOTO, like ASM, like POINTRES which are the funnets thing to do every in a programming langue pointers are the coolest thing taht was ever invented ok so first of all when pointers programming was diffrent pefor before they have pointers because it used to be that you didnt have them and you had to write your programs on TAPE! but then the coolest programming programmer in the Universe um BRIAN KERNEIGRAN and DENNIS RITCHIE invented the BEST programming language ever C ! now programming is in two parts ok so firsdt it was "BEFORE POINTERS" (which means before C because they didnt hsve that before see ok got it ) So then AFTER C wjich was a computers rennosance in the world and the grass turned getreen which it wasnt before they had C byt then we could make the grass green after it was invented by the C got ther C GOD+S BRIAN KERN AND DENNY RITCH. Ok So why are pointers so g cool? to a HERETIC who does not progamming in C then it seems like a mystery but it will not after you finish reading my book. OK so not olny does C have pointers and MALLOC hwich i like I love writing malloc() when I write my code that is so much fun to use and it is suo s useful ! and peopel who wd ont understand first of all think of it like a TURING MACHINE whoch was invented by this person called alan turing who in the 50s killed himself for being gay but before that he invented turinning machines which was like a n peice of tape except it was actually a comptuer!@ ? and then when C invented MALLOC you could own parts of the tape so fred form school wouldnt bullt y you w and write all over YOUR TAPE! which is what happened before C was invented and then when I was I typed MALLoc into the cmputer and I was like WOW! that was so cool ? how about that . SO not only does it have that but it has GO-TO which is so much fun because its how your computer does anything on time? when you use go to you your comptuer goes fadster because it is OGING TO the write answr. that you asked it fori. but stupid epople dont know how t use these htings which it why wi is why FUCKINg shitty programming lnaguages copied C!?!?! but they didnt copy the good park wehcih was using malloc and got os which is w so much fun and first ofal alo fus first of all if you use a SHITTY GAY programming lnaguage like java ? you shouldnt you should kill yourself ok first of all otehr pgroamming langueges like java-script are stupid and poopy and gay and first of all g java is gay and stupid and it was invented by this stupid giy who CPIED C? but C was copyrighted which is whay nobody programms in java except for te retarded people ok because first of all java does not have it wa does not even have GOTOs like who invented this shitty TRASH you cant even do anything and it does not even have memory management and why like why wouldn t you let people callc MALIC wow like golly gosh , like wow why would anyone use this peice of shit like when ever I write code in java script it feels like I am drinking bleach which is not fun at al.

...

smh
your white male children will be castrated, your wives and daughters will be brought to the interracial breeding grounds

seriously though, fuck off

Is this a copy pasta or autism? Call me old but I honestly can't tell these days.

wrote it yesterday as a joke, it didnt even fit into the post.

pastebin.com/jz1rMzMt

If people really think they need a new language to do better than C, why don't they just pick ONE feature to add and keep the rest as close to C as possible? Like this
claylabs.com/clay

Oh my god that thread was amazing. Nobody even gives a shit anymore now and just play along.

But really though, if you believe these kinds of infographs, you either/or:
Need to read a fucking book.
Hang yourself from the closest tree.

500 characters shorter:
pastebin.com/TAXX0SVT

I used htwins.net/unicrush/

What feature do C style for loops have that's so important?

You can modify the loop index from inside the body of the loop.

Lot's of wimmin take it in the ass and call themselves "technically virgin".

And why can't you modify said index in a while loop?

They're a versatile, compact and easy to understand way to perform iteration in general. They allow you to define the iteration variables inside the loop instead of polluting the outer scope.

You can also do it with goto, but that doesn't mean it's a better alternative.

for i in 0..400 { // do some shit with i}

99% of for loops are used to iterate over arrays, and 99% of those iterations are simply 0..n-1. Hence, iteration counters are boilerplate most of the time.
for elem in arr is vastly preferable to for (elem: u32 = 0; elem < arr.length(); elem++). No type declaration for the counter, no explicit marking of bounds, no need to figure out the array's length, and no redundant ++.

*second example should be for (i: u32 = 0;... as it's not the element itself but an index into the array

Range-based for loops are fine for what they're supposed to do, but why would it be a good thing to intentionally omit the more general and flexible version?

Makes the parser a bit simpler, I guess? I dunno

It's all in the name of "safety."

Every modern language has inner scopes.
{ let mut x = 0; while x < 40 { x = x + 1; }} // x doesn't exist here.

...

...

Yes, but the for loop is terser, while still being just as understandable.

for (auto i = 0u; i

...

psh, come back when you have a job... kid

rust and node.js are the future.

Yeah because I'm sure you can write an hybrid sort as fast as the one in the standard library. And on first try too.

Meme languages are favored for their attempts at retard proofing above all else

the hardest part of C++ is getting 10 people who are actually good at it in a room together

But if you can manage that...

... then you'd have 10 people who would much rather write C in a room.

dont even joke about that

Just namespace it you retart

There's nothing bad about a future where we're all writing Rust, so long as we can kill Node.js.

...

No, because compared to C, C++ also has:
- superior generic programming capabilities
- RAII
- namespaces
- lambdas
- constexpr functions
- overloadable functions and operators
- references
- member functions
- class inheritance
- slightly better type safety
- a richer standard library

Anyone who's actually good at C++ will not want to deprive themselves of all these convenient options.

cool weasel words fam

I was using the exact words used by .

Maybe you have an objection to the idea that someone who's good at a language would come to appreciate its useful features?