Admit it

Admit it.
You like to call C++ names like shit or overbloated, because you are too retarded and lazy to understand and learn it.

Attached: 1200px-ISO_C++_Logo.svg.png (1200x1349, 69K)

Other urls found in this thread:

en.cppreference.com/w/cpp/language/value_category
youtu.be/HMB9oXFobJc
youtu.be/vA5sdxbwUG8
twitter.com/SFWRedditImages

in my experience no one really understands C++
everyone just fucks around with it until it works
t. C++ dev

Cope

Based thread.
Like it or not c++ is the fastest & most expressive language out there. Cope with it pajeets.

Attached: 1884a41d868e060b26da6f78dd6920743c4d2e873431c59900917ca9785739d7.jpg (603x324, 105K)

You're god damn right I'm too lazy to learn it. My current workplace uses C++98 sugar coated with constexpr, lambdas, move semantics, and a few other tricks. Actually keeping up with the latest standards is for morons.

>Doesn't have complex primitive
No thanks
t. C dev

What complex primitive does C have?

the people who use it are complex primitives

I don't understand, you mean some thing like
struct complex { double x; double y; };
?

i like c++, i think it's bad for more people to learn though because there are so many bad resources, especially ones pre-c++11/14

#include
int main() {
double complex a = 1.0 + 1.0 * I;
double complex b = 1.0 + 0.5 * I;
double complex sum = a + b;
}

You can easily easily import it into any C++ project ever. At most, you'll have to add extern "C" or something like that to utilise the C linker, but that's a maybe.

>look this up
>it's just a hack with a macro

#include
int main() {
auto a = 1.0i + 1.0i * I;
auto b = 1.0i + 0.5i * I;
auto sum = a + b;
}

Much better.

You can write some wrappers, sure, but the point is that you can't use C99 complex numbers in C++. You have to either use std::complex, which is incompatible with them (except on gcc, because fuck portability), or use/write a library.

I tested them out for 5 minutes and they work fine without extern "C"

Attached: giphy.gif (480x205, 3.48M)

Even java can do that.

Basically this

I remember hearing from fellow C++ devs how hard and complicated C is then I was forced to develop on C for some microcontroller and I couldn't belive how simple C is.

Learn Lisp.

>ywn be an expert c++ programmer making 500k a year

Attached: c++.png (737x70, 6K)

C++ would be OK if they didn't have that stupid committee that, solely for the purpose of justifying their superfluous existence, invents new features and new syntax every few years that nobody asked for and nobody needs.

I have just started to learn c++ for the eventual hope in 6 weeks I can make a text based adventure. If not maybe a dice adventure based on laws of average.

i hate pajeets like you, you create a fucking mess i have to inherit every time.

this

I'm sure people said the same exact thing pre c++11

>you are too retarded and lazy to understand and learn it.
I have limited lifespan, user.

C++ 11 was a mistake

whatever you say, ooptard

>understand and learn it
Honestly, with the same effort you can become a nuclear physicist, not speaking of simpler shit.

How can you justify learning C++ specifix stupid shit? Is it because you limited yourself to programming at one point in your life?
I don't get it.

Huh? I'm a C developer, I write procedural code, imho the only good things in c++ are namespaces and function overloading.

Then why say C++11 was a mistake? C++11 brought huge improvements to C++, mainly a better memory model and vastly improved templates and threading.
C++03 and below were awful.

Yeah ok I looked up C++11 changes and they're ok, I just remember the bad ones more.

>You like to call C++ names like shit or overbloated, because you are too retarded and lazy to understand and learn it.
Not at all. I like C++.

Not having a complex primitive is a feature. Every language feature that can be turned into a library instead is a good thing.

This. C++ is pretty shit if you look at it from a modern perspective. The only reason its still "living" is because its there to create jobs.

C++ looks like diarrhea

What's the best book that can teach me C/C++?

You wanna learn C, C++ or C++-- (aka C-style C++)?

Hell, any of them is fine. Thinking it could be a decent hobby.

to someone who doesn't know shit
everything looks like diarrhea

>C++ would be OK if they didn't have that stupid committee that, solely for the purpose of justifying their superfluous existence, invents new features and new syntax every few years that nobody asked for and nobody needs.
Imagine being this fucking retarded

A programming language is not hard to learn. Designing good algorithms for hard problems is hard. C++ is just big, that's why it seems hard for some, but it's not a real difficulty.

> but it's not a real difficulty.
But apparently writing correct english is a real "hard problem" for you.

holy fucking BTFO

F# is the future.

I exclusively use C++ 03 in Visual Studio 2008.

If you don't like my english then we can talk in any of the 5 other languages I know

you're wrong, OP, because I understand all of C++

nah, cpp doesn't fit in 2KB and that is why it bums me out.

Jow Forums and Jow Forums in general aren't exactly the cream of the crop. The vast majority of posters are brainlets or average IQ people thinking that they're above average.

underrated post, I laughed

What is the token that can be used instead of ~ to mark a deconstructor?

Yeah, well I didn't see a rebuttal tho.
>Calling someone's opinion retarded without dismantling his opinion and making him look retarded, well makes you the retard fren.

No, I've never attempted to use it because it's overly complicated and extremely slow to compile.

Full time C++ developer for the last 3 years, and I've been using it on and off since 2009 or so.

It's a terrible language. It has more features than C, but these features do not reach the same level of thoughtful design. Stroustroup was no Ritchie.

Maybe in the 80s it made sense to have a high-performance compiled language with high-level constructs to support more complex codebases. But these days it's a poor compromise. Higher-level features are emulated through automated copy and paste (i.e. templating,) which is fine until you get a compile error (the compiler will point out what's wrong with the expanded template, not the code you actually wrote) or debug anything (hitting 's' 500 times just to single-step through ++i in gdb.)

You also have the problem where all the most intuitive and simple syntax was already taken by C, so when the C++ developers go to add new features (vectors instead of arrays, smart pointers instead of raw pointers, closures and lambdas instead of plain functions, std::string instead of C strings, templates instead of macros, and basically every other redundant copycat C++ feature,) they are forced to use much clunkier syntax. And then, when you try to use the readable syntax instead of the unreadable syntax, they call you names.

We have better high-level languages now, and you can still write your hot-spots in C using FFI or SWIG. 90% of the C++ I write is glue code that doesn't need to run all that fast and would be better written in Python or something.

compl or a trigraph if you're not using C++17

For C read K&R (google it). For C++ Stroustrup's (?) Programming Principles and Practice

>Full time C++ developer for the last 3 years
>It's a terrible language
Nah, you're just a LARPing faggot.
>It has more features than C, but these features do not reach the same level of thoughtful design
Give me an example you retarded nigger.
>Higher-level features are emulated through automated copy and paste (i.e. templating,)
Ah you're an absolute moron, got it.
>they are forced to use much clunkier syntax
Example?
>We have better high-level languages now, and you can still write your hot-spots in C using FFI or SWIG.
>SWIG
Disgusting.
>90% of the C++ I write is glue code
Ah you're just a clueless webdev.
>would be better written in Python or something.
Confirmed moron.

this is the most accurate post regarding C++ I've ever seen.
the codebase I manage is this absurd collection of C macros and we've been looking at turning it into C++ instead. Every time we try we just run into roadblock after roadblock after roadblock with readability and extensibility. C++ is just weird "safe" wrappers around shit you could just do in C.

>reee ur just dumb reeee

C++ post version 11 is excellent, albeit a little verbose, you can even go almost functional with it

Not OP, but ill bite.

> do not reach the same level of thoughtful design

- every function needs `noexcept` to have regular C levels of overhead.
- References + pointers + rvalue references + const references + const pointers is a clusterfuck.
- Initialization is a clusterfuck.
- Rule of 5, rule of 3, ok why can't the compiler tell me this?
- Double diamond pattern and multiple inheritance

>they are forced to use much clunkier syntax

This is what functions look like in 2019

```
template
std::unique_ptr search(const V& c, const T& y) noexcept {
using I = iterator_traits::
...
}
```

I'll add some more.

- The standards committee is a shitshow. There is no coherent vision. The only thing they could agree on this time around is `` which should have never been a thing, and even then could have been `std::cmp`. WTF is the point of ranges, did they not understand iterators?

- The community is filled with language lawyers. They use rhetoric like "just use the parts you want and make a safer C" and then push giant C++ standards on you and enormous undecipherable libraries.


C is God. C++ is a dumpster fire.

- Ex C++ fan who finally escaped.


Can you tell

>C++ is just weird "safe" wrappers around shit you could just do in C.
RAII, go.

samefag

>- every function needs `noexcept` to have regular C levels of overhead.
You have no idea what noexcept does then. Noexcept does not allow a function to compile if anything it calls throws an exception. That's all.
>- References + pointers + rvalue references + const references + const pointers is a clusterfuck.
No you're just a moron. People demanded something like rvalues for ages in C++ to express intent.
There are actually 5 different kinds of values, and you already know them implicitly:
en.cppreference.com/w/cpp/language/value_category
C++ standard just makes it absolutely clear what would happen.
>- Initialization is a clusterfuck.
You're a nigger.
std::vector xs {1, 3, 5};

Oh my god such a clusterfuck. The only clusterfuck here is your genetic code.
>- Rule of 5, rule of 3, ok why can't the compiler tell me this?
Don't want a rule of 3/5? Then don't fucking use destructors. 90% of people who quit using C++ don't understand the rule of 3 even though it shouldn't take them more than an hour to understand the concept.
>This is what functions look like in 2019
>```
Discord tranny confirmed. Fuck off back to your Rust channel. "Oh no, C++ now has unique_ptr". You'd be complaining that it didn't otherwise. Your complaints contain no context and make no sense.
>- The standards committee is a shitshow. There is no coherent vision
Welcome to corporate America.
>The only thing they could agree on this time around is ``
I like Herb Sutter's spaceship operator. It's compact.
>WTF is the point of ranges, did they not understand iterators?
Ranges are meant to be used across containers. What happens if your iterators are from two different containers? Retard.
>The community is filled with language lawyers
Ignore them. They're just fat faggots without anything of value attached to their name.
>just use the parts you want and make a safer C
Use whatever you want as long as you know what you're doing.

Attached: 1563133375280.png (787x830, 647K)

ok

Attached: ok.png (1440x2269, 359K)

I give you, alloca().

or garbage collection

>Oh my god such a clusterfuck. The only clusterfuck here is your genetic code.
Now declare a constexpr std::map and initialize it

>constexpr std::map
you can't, dumbass, it's intrinsically a dynamic type.

C++ in a nutshell

this
after 5 years of C++ i still stumble into stl parts that I didn't know they exist

C++ is pretty good as a language but stl is just a clusterfuck

It will come into the standard soon.
youtu.be/HMB9oXFobJc

>The community is filled with language lawyers.
kek

The problem with C++ is really it's community. If you don't want to use some part of the "modern" C++ stuff or you use some C-style stuff they'll tell you how stupid and outdated you are. Even rust has fewer purist than C++.

You can also get yelled at for using any CS construct more advanced than an associative array because the C++ syntax for things like closures is so fugly.

It's not fully true. C++ without STL is almost completely fine and perfectly understandable. C++ welcomes you to build things that are unnecessarily overcompensated, and STL is partly that. Parts of some popular libs, boost.log for example, are super overcomplicated and you'll struggle to handle issues with them even if you know C++ well.

VP of technology at EA.

Attached: Screenshot_20190124-102045~01.png (1080x1029, 222K)

Is it?

[&](int a, int b){ return a+b; }

Is it ugly? I don't think it is.

It could be worse, but it doesn't match the regular function syntax, and it should. The std::function bullshit is horrible as well.

It almost matches, which is how it is for almost all other languages. std::function is fine also, not sure what your problem is with it.

What you want is a frozen map.
youtu.be/vA5sdxbwUG8

> It almost matches, which is how it is for almost all other languages. std::function is fine also, not sure what your problem is with it.

There's no reason it shouldn't match exactly The mismatch is not actually normal.


def make_f (i):
def f (j):
return i + j
return f

There is a very clear reason in case of C++ - you have to specify whether you want to copy local variables or reference them, or a mix of both.

but stl is the only real reason for using it over c

construictors/destructors, virtual functions
i won't list any more because this alone is enough already

>construictors/destructors
You can do this in c already by calling things when you free or malloc them.

You can do literally everything in C. You can do virtual functions in C using function pointer fields inside structs. The reason for using C++ over C is not new functionality previously impossible in C, it's convenience.

enjoy your stack overflows and lack of portability

The point is to not do this because you'd have to clean stuff up on all control flow paths. Yes, you can do that, but it opens up a lot of additional memory leak opportunities if you miss something and it needlessly increases code size. AMM doesn't reduce performance and is objectively superior.

Honestly this.
Naggum was right when he said that only around 5 people on Earth truly know C++.

C++ is undeniably a language with many flaws and a not-so-brilliant design, which certainly need to be addressed.
The problem is that many people criticize it for the wrong reasons, the most common one being the implication that C is somehow better. In fact, possibly the root cause of everything wrong with C++ is its C foundations.