If modern c++ could speak it would beg for death

Attached: mc++fl-on.png (1114x640, 121K)

Other urls found in this thread:

tour.golang.org/
harmful.cat-v.org/software/c /I_did_it_for_you_all
drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197
twitter.com/SFWRedditImages

from ?
what's next?

wtf I love Python now

even javascript looks better if used correctly desu

i'd beg for death if i was riddled with gnu cancer too

Just use it as C with objects.

looks beautiful desu
java is even more verbose without lacking most of the functionality

t. brainlet

I'm not sure if you brought up Java because you think it's also another name for JavaScript.

What are some C11+ features that you'd actually use? The only thing I can think of is auto in iterator initialization.

>looks beautiful desu
ask me how I know you have aspergers

All of them.

>useless, poorly formatted code written to show as many features as possible in a few lines
>lol look what a shit language
What's the point of your post?

>C11 and above features
>auto in iterator initialization

Attached: 1509615503237.png (963x720, 602K)

auto is from c11, pretty sure

>lambda expressions
>constexpr
>auto type deduction
>defaulted/deleted functions
>nullptr
>smart pointers
>range-based for loop
>override
>final
>variadic templates
>static_assert
Off the top of my head

> cat test.c
int main() {
auto a = 1.0;
return 0;
}

> clang -std=c11 -Wall test.c
test.c:2:7: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
auto a = 1.0;
~~~~ ^

99% sure he means C++11

oh no no no
look at the top of his head

>lambda expressions
awful syntax for slight organization/convenience boost, not worth
>constexpr
marginal pointless improvement
>auto type deduction
you must be joking
>nullptr
>smart pointers
ok
>range-based for loop
perfect example of fixing what aint broke
>override
>final
crutches for brainlets
>variadic templates
i hate having to read that shit

my aspergers are irrelevant, baka

>I'm retarded
Thanks for the feedback user

why user?

at least c++ has muh performance to justify its ugliness, JS has nothing.

I'm this point I'm way too deep into the Stockholm syndrom to feel anything about C++'s syntax.
I ascended to a superior plane.

>override
>final
do people still use OOP in 2018, for real?

>superior plane

Attached: 927.png (640x640, 22K)

no it's not. it means you lack normal human sociability levels and thus have a deficit in understanding what makes a presentation appealing to other people, a necessity to anyone who wants to have a career in the arts.

tour.golang.org/

No thanks. No matter how much they try to bloat c++, it will always have a good subset inside it at least. All you gotta do is tell your retarded coworker who keeps telling you to use auto to go fuck himself.

Stop with the autistic "my subset of C++" nonsense and just use C.

void pointers need to be casted
it's a trash subset

>auto
That's done at compile-time

>stop using what makes the language good and use shit

>doing less work with no penalty at run time
blasphemy

>tell your retarded coworker who keeps telling you to use auto to go fuck himself
8/10 if troll
2/10 if pasta

auto is a good way to make the code incomprehensible.

No one is making you use it like that though.

>Use language poorly
>Language bad bad!

Every single programming language needs to be written in a certain style. Especially C, because for every reasonably competent C programmer, there are thousands of brainlets who think that manually managing memory makes them smart.

More importantly, why do these exist? Both final and override should be default attributes.

C++ may be filled with insane overengineering but some changes like the addition of shared_ptr/unique_ptr are unequivocal improvements that you're missing out on by adhering to "C with objects"

Unless you're explicitly doing type-driven development (something only Idris can do, so basically never in a real project), auto trumps explicit declarations.

Because you're missing on features that make your code cleaner, safer and more expressive.

If you're not writing non-OO code in languages specifically made for OO you're fucking doing it wrong.

>>variadic templates
>i hate having to read that shit
the point is you don't have to read it, most of the template bullshit is for library devs to make life easier for the user
>t. library dev

meanwhile i'm writing in C# and have no idea how hard it is to manage memory but it sounds pretty daunting.

>C++
>language specifically made for OO
when will this meme die
I know people who wrap literally everything in a class instead of a namespace, and then still put that inside a namespace, insisting that free functions were only included in the language to make C programmers happy
drives me up the fucking wall it do

OO Is a dead paradigm

override exists so that you don't accidentally overwrite a parent method. There is a reason why java and python and other OOP use override annotations on methods.

>Override
>Not OOP
>mfw Polymorphism is no longer consider OO

Did you even read what I said?

That just sounds like buzzwords.
Are you a syntax salesman shill?

>not decltyping to completely unrelated variables that happen to have the same type

based

why would i read what you said when i can just write a comment

Honestly it depends. Some tasks simply don't bide well with OOP so it makes sense to do whatever is more efficient and readable. That said, saying C++ was not C w/ OOP is a tad silly, as it was literally orignally called "C with Classes" and got renamed to C++ later on.

Elaborating, i think anyone who strictly follows "best practices" without thinking about why they are doing them are failed programmers. A good programmer knows when to break said "good patterns" when following the pattern becomes less readable/efficient to program.

Good and bad patterns are more like stereotypes, in most cases they are right but they are not absolute.

those are larping java faggots who think OO means absurd class hierarchies and endless layers of bullshit

wot if u don't make one class per method / property and inherit them to make a single class one file at a time you're fucking doing it wrong, retard.

variable init in if is very useful
if(auto i = something(); i.valid() {
i.f();
...
}

Why is this better than auto i = something();
if(i.valid()) {
i.f();
...
}?

>do people still use OOP in 2018, for real?
how do you dynamic dispatch without it? Polymorphism without classes would be better, but few languages support that
because i isn't visible in the outer scope (no variable name clutter and it's clear it's only needed in one place) + dies outside of if (no resource waste) + only takes one line

Lel you fell for Bjarne's prank

Attached: 1539475890985.png (1423x2643, 255K)

Pic related

Attached: 1499798088868.png (1620x774, 40K)

why not just post a link you stupid nigger
harmful.cat-v.org/software/c /I_did_it_for_you_all
by the way a lot has changed in C++ since then
it's a good language, maybe the best

Attached: proxy.duckduckgo.gif (331x255, 979K)

>it's a good language, maybe the best
the single biggest problem imo is lack of covariance for smart pointers

yeah that's kinda my point
luckily I was able to find a Scott Myers article about encapsulation to wave around drdobbs.com/cpp/how-non-member-functions-improve-encapsu/184401197

>single class one file
they do this too
you may be able to guess but their code includes no template metaprogramming

>Javascript is Java

This is the state of neo/g/

You write java scripts in java but you write javascript scripts in javascript

Dumb anime poster

Thanks for the laugh OP.
However, you forgot to include the align keyword, bit fields, structured bindings, contracts, the use of ' as a delimiter for binary literals, and parameter packs.

>trump
stopped reading there

who the fuck uses that shit for anything but OS type programming

People don't actually use any of this shit outside meme examples.

>who the fuck uses that shit for anything but OS type programming
Nobody imo. Unless someone knows otherwise.

All the job postings for C++ that I see are involved in close-to-hardware level programming, OS/CPU/etc

>he doesn't use C++ for web programming

auto in C and C++ are completely different

I hope you're joking user, and not actually retarded

Attached: 1468786994486.jpg (1121x1004, 92K)

c++ can be a beautiful language if you're not a brainlet

Attached: lazily evaluated, pure functional, run time expression building, compile time, polymorphic range ada (724x359, 16K)

Now correct me if I'm wrong, but those smart pointers are literally just template object instead of C++ language features.

They are just templates yes. The only language features they rely upon are templates, move constructors and destructors.

>tfw I'm c++ programmer
>mfw I read this thread
stay salty brainlets

Attached: 1536688813375.jpg (203x241, 6K)

C++ could be a lot simpler without losing any of its expressive power. Bjarne himself admits to that.

haha all this shit looks like motherfucking gobbledygook to me

Yeah. That's true. In my humble opinion everyone hates cpp because it's bread and butter of the industry and involves real engineering and THINKING.

Everyone hates c++ because it is more complex than it needs to be. I'm ambivalent because I recognize that it's still the most flexible and powerful language in its particular domain despite the design flaws.

There's nothing complex about it, newer C++ versions just add irrelevant amounts of "features" which don't actually do much.
The most beautiful design is the one that is one which is as minimal as possible but not more.

C++ looks ugly I don't like it

Dead as in used in literally every other big project? Kys freetard

"If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?"
And that's just C++98.
11 alone doubles the size of the language.

Kek, I wonder if we could make a chat bot that uses only C++ keywords (and derivations)

nothing can be beautiful with that garbage font

My, take a look at that spaghetti code

Being complex is not a flaw. It's up to programmer to choose which features to use or not. You can write pure C code in C++ theoretically, or you could write a full-blown OO code.
With C++ you don't have to lock yourself down to one paradigm because it's good for everything, and it has also unlimited performance potential (i.e. matching C), which makes it the best language period.
There are probably even garbage collector libraries for C++ if that's what you need.

i really really like that font. what is it?

A lot of NPCs think that JavaScript is Java for websites because it has Java in its name.

>[[depricated("abc"]]
what the fuck?

isn't this C++17? also i believe there's a syntax error in your code