Why don't you like C++? It's like C but better

Why don't you like C++? It's like C but better

Attached: New Game!! S2 - 01 「Of all the embarrassing things to be caught doing...」 (00_09_35.700).jpg (1280x720, 140K)

Because I'm not an OO pajeet.

no thanks, I'll stick with C

Attached: image3983.png (1055x1217, 588K)

Why no break/return in the case of m_currentHealth

That's actually what the finger is pointing to, they're trying to debug this in the anime

The wikihow stock image click factory workers don't give a shit about code validity.

What anime is this?

>Why don't you like processed dogshit?
>It's like dogshit, but better!

New

New game!!

Attached: New Game!! S2 - 01 「Of all the embarrassing things to be caught doing...」 (00_10_46.896) 0001.jp (962x820, 209K)

Hello retard

new game uwu

Attached: Sakura_Nene_CPP.jpg (1280x720, 111K)

as someone who is currently neck deep in their first real in-depth exploration of c++, let me tell you that you are wrong

does this look better than C to you?

Attached: out.png (1920x1080, 113K)

how about this elegant c++20 code that prints pythagorean triples?
/ A sample standard C++20 program that prints
// the first N Pythagorean triples.
#include
#include
#include // New header!

using namespace std;

// maybe_view defines a view over zero or one
// objects.
template
struct maybe_view : view_interface {
maybe_view() = default;
maybe_view(T t) : data_(std::move(t)) {
}
T const *begin() const noexcept {
return data_ ? &*data_ : nullptr;
}
T const *end() const noexcept {
return data_ ? &*data_ + 1 : nullptr;
}
private:
optional data_{};
};

// "for_each" creates a new view by applying a
// transformation to each element in an input
// range, and flattening the resulting range of
// ranges.
// (This uses one syntax for constrained lambdas
// in C++20.)
inline constexpr auto for_each =
[](R&& r, Fun fun)
requires Range {
return std::forward(r)
| view::transform(std::move(fun))
| view::join;
};

// "yield_if" takes a bool and a value and
// returns a view of zero or one elements.
inline constexpr auto yield_if =
[](bool b, T x) {
return b ? maybe_view{std::move(x)}
: maybe_view{};
};

int main() {
// Define an infinite range of all the
// Pythagorean triples:
using view::iota;
auto triples =
for_each(iota(1), [](int z) {
return for_each(iota(1, z+1), [=](int x) {
return for_each(iota(x, z+1), [=](int y) {
return yield_if(x*x + y*y == z*z,
make_tuple(x, y, z));
});
});
});

// Display the first 10 triples
for(auto triple : triples | view::take(10)) {
cout

Is all of this bloat actually worth learning?

cringe

Yes, actually in my opinion.
C++ template power is one of the main reasons I use the language.

>putting damage calculations inside your entities

stupid nene

dumbass

It’s a weird time for c++...

I guess because fucking shit anime shows use C++ and anime is cancer.

>REEE FUCK C++
>C++ is the only language with any real support on Windows
>Windows is the only platform that matters
>neither of those facts are about to change any time soon

Attached: 1541475988443.png (142x250, 85K)

Linux Torvalds says its shit and I have no reason to doubt the guy who invented the operating system kernel that runs on all of the top500 most powerful computers ever created by the human species

>"Within C++, there is a much smaller and cleaner language struggling to get out" -Stroustrup

Attached: 5c.jpg (912x516, 38K)

He's referring to the subset of the language that constitutes modern C++. The language is required to have a lot of legacy features that are just there for compatibility with older software. Unfortunately, a lot of people are taught poorly and believe these legacy features should be used in new software and they end up writing extremely ugly programs because of it. Even more unfortunately, a lot of people actively seek out these obscure language features because they think it makes them look smarter by using them.

Backward compatibility is the worst thing that ever happened to anything when it comes to designing systems. C++ was designed first for C to be compatible and then for C++ to be compatible with itself. It follows that C++ was doomed to be a terrible language from the start and that there was nothing Bjarne could have done to fix it, except breaking compatibility with C, which would have made C++ unpopular.

I don't hate C++ but I seriously wish it didn't exist.
t. Working on an old code base with manual memory (de)allocation.

So we all agree that c++ is trans right?

Are we post-op or pre-op? Is this just a phase?

its like C but bloated

Your bait is good enough to receive a reply, at least.

No, C++ is the worst language that is taken seriously. C++ is to C as lung cancer is to lung.

if you want to write functional code, then simply use a functional language. doing all this shit in c++ is absurd because c++ is not the right language for it.
so, no. i've seen tons of quality production c++ code and none of it (absolutely 0) uses this shit outside of templates.

The level of abstraction is different u dig?

Ah, that anime girl is using Windows, I can tell because she used one finger to scroll, something Linux is still decades away from.

>next generation proprietary memory allocation techniques.
STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck
INSTEAD OF USING NAMSPASES CREATE MUH OBJECTS
then use em for creating memory leaks everevere

It's not that if you are shitty at programming than its the language fault
It's just that you are a shitty programmer

Linux is capable of touchscreen support. Chromimum already has scrolling with your finger by default. Shitty developers who are too lazy to add a few lines of code to their applications have little to do with GNU/linux itself.

Why don't you like C#? It's like C++ and Java but better than both combined

I was keen on watching an anime about coding until I realized it's some pedo bullshit.

Its in the filename you fucking absolute retard.

>look mom, I copy-pasted it again

bitch u better tell me what font that is

its just GNU unifont

i use it because it gives me good unicode and symbol support on xterm

Any good resources for QT, I might've fucked up when I chose this for my project

Attached: 1532227412881.jpg (494x363, 14K)

it's more than

Th fucking official documentation, you nigger. RTFM.

Because C is elegant and capable of a lot. C is like a finely honed tool that fits your hand perfectly.

>c++ for a final project
absolute madman
should have used python + pyqt

Attached: 1542216663052.png (1500x1500, 1.53M)

New Gameu!!

Attached: 1544758648361.jpg (602x1024, 74K)

Attached: 1544758681680.jpg (603x1024, 78K)

>I would try out the language as it was being developed and make comments on it. It was part of the work atmosphere there. And you’d write something and then the next day it wouldn’t work because the language changed. It was very unstable for a very long period of time. At some point I said, no, no more.

>In an interview I said exactly that, that I didn’t use it just because it wouldn’t stay still for two days in a row. When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language. I never said it was a bad language. On and on and on. Since then I kind of avoid that kind of stuff.

Attached: faces.KenThompson20515.web_.jpg (1619x2024, 2.42M)

This slut is of legal age

Attached: 2b8.png (544x404, 346K)

>its about cute adult-aged girls working at a game development company
>pedoshit

Attached: 1504947407879.jpg (179x179, 12K)

They're all 18+ you nigger

>elegant
that's disgusting

but, why the picture of buffalo jill?

It this point I petition for C++ to change its nameto C::

It demonstrates that you can't fix C by adding extra shit to it. We need a new basis for systems programming.

S3 when?

Attached: 1545988752893.jpg (1920x1080, 181K)

Why don't you guys use js/react instead of c??
it's like c (i've read) but butter!1
- 3l1t3 h4ck3rxxz

>better

C doesn't need to be fixed, It is great for writing operating systems, drivers, and other stuff it was designed to do.

C++ is deprecated, someone already invented Rust.
Get over it, pajeets.

Its really not like C, and its not better. If it was better it would have replaced C.

C boomers

Attached: 1506568787873.jpg (262x274, 19K)

>Why don't you like C++?
Compile times.
>It's like C but better
That's still pretty bad, desu.

>C is great for stuff it was designed to do.
No.

ecs is a meme

*sips* ahhh C, now THAT was a language

Do elaborate

>be in academia
>write most code in fortran/python/julia for legibility so that it's easier to figure out what it's doing
>have some old, but working legacy fortran code
>department paid software company to rewrite that important algorithm that literally brought us millions worth of grant and other funding
>in C++
>nobody can read and make sense of the fucking mess

Scientists should stay the fuck away from C++.

but with C++ shitty programmers feels (You)self like not shitty programmers

One day an article entitled "Lamentation of Modern C++" pop up on r/cpp and now every C programmer here wants to use it as a strawman. I could do the same things. Cherry pick some C code that is convoluted, unreadable and necessarily complex. Sometimes the burden is also on the programmer.

>department paid software company
>nobody can read and make sense of the fucking mess
It's deliberate user

We've got like that one 'scientific programmer' guy that had overseen the whole process. He obviously knows what's up, and he's the only one of us who can make any signficiant changes to the code. It's fairly obvious he cemented his role and employment.

Granted, the whole thing runs about three times as fast now, at least there's that.

It is not great for stuff it was designed to do. Also "designed" is a big word for the process.

>Scientists should stay the fuck in their containment zone that is Fortran, R, now Python and soon maybe Julia.
ftfy

Why the fuck move away from Fortran.

Fortran just fucking works.

>Not doing everything in Verilog

and THEY f-cking love that feel

I guess the idea was to go full OOP with this so we can, in theory, react quicker when new instruments go online and make our algorithm work with those. In my experience, Fortran is great for small to mid-size codes, but once it passes a certain complexity threshold, it becomes unmanagable. Luckily we have a clusterfuck of C++ here.

We love the power we get from using the almighty and addicting feel of C++. There is a VERY good reason why SO MANY people TRANSITIONED to C++. Don't you need to take a nap graps?

>next generation proprietary memory allocation techniques.
STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck
INSTEAD OF USING NAMSPASES CREATE MUH OBJECTS
then use em for creating memory leaks everevere

Someone already posted this, fucktard.

>>next generation proprietary memory allocation techniques.
What are you rambling about?

Does anyone actually ever uses modern Fortran?

Yeah, we do. Plenty of research groups do as well. If you need something written that's somwhat performance-critical, most people in science tend to go for Fortran.

Oh god I'm so sorry user. It looks lovely now but the honeymoon period with C++ ends fucking fast. We used to have a C++ codebase at work, mostly OOP. It was clearly very well organized at first but then the industry changed ways that couldn't have been forecasted by their stupid UML diagrams, and the entire thing went to shit.
Spent 2 months rewriting the entire thing in C. It's now half the number of lines of code, more easily extensible, and the performance is identical. All our tests were written in a pretty procedural style anyway so adapting those was easy.

Goddamn. Anecdotes like these want me to quit using C++ and start using C right away.

It is still a language. In fact it's still the only good language for programming kernels. drivers and embedded systems. And C++ is almost as old so the boomer meme seems particularly dumb in this discussion.
>It is not great for stuff it was designed to do. Also "designed" is a big word for the process.
It's still used for most systems programming nearly 50 years later so clearly it is pretty great. Or at least better than anything else that has came along.

But is it Fortran 2000+?

>look at CMakeLists.txt
>-std=f2018
Yup

>so clearly it is pretty great
By that logic, PHP, JS among other things are pretty great, too.

based, but probably rare

>next generation proprietary memory allocation techniques.

Attached: MEMORY_ALLOC.png (699x701, 269K)

Cool. And?

STRINGS, VECTORS, STL, BOOST
all this shit slow as f-ck

Aside from that you niglet

Attached: 1460283161434.jpg (777x777, 95K)

I need citations for this claim. Also, the C++ STL has been battle tested and hardened through rigorous testing. Also, no need to censor yourself. Just say "fuck".

If you spent 2 months rewriting it in C++ you'd end up with the same gains. You got them not because you used C but because you were doing a rewrite in the first place.

>3 or 4 accidentally turing complete languages embedded

C++ without STL is superior to C in every single regard.

And don't forget that you can bring your own STL.
>can't even into verbs
Claim dismissed. And you could even have had a point, if you had mentioned map and unordered_map, back then, but no.