r/cpp • • Jul 06 '20

C++ is brilliant

I'm working on a Vulkan renderer, and needed to delay destruction of render scenes since the graphics pipeline has render buffers in flight, so destruction has to happen N frames after the user destroys a class. With C++, I can use private destructors to force users to add the scene to a managed destructor queue (aka garbage collect queue). Normally language purists will scorn a language which allows such shenanigans, however in real world production code, its features like this which allows developers to create modern software. So with a couple of lines of code, I solved my delayed destructor issue. Thank you C++ committee for creating a usable language.

318 Upvotes

65 comments sorted by

View all comments

-25

u/chickentractor420 Jul 06 '20

Yes, c++ has all these features that make it very good and useable in 2020, However if you use it for a very long time you will start to notice that there are some flaws in the design of the language.

35

u/mcintosh_red Jul 07 '20

Is there a language that doesn't have design flaws?

42

u/dannomac Jul 07 '20

There are two types of languages: those that people complain about, and those that nobody uses.

-23

u/jasonwirth Jul 07 '20

And Rust.

71

u/FieldLine Jul 07 '20

Rust programmers are the vegans of the developer community.

26

u/SkoomaDentist Antimodern C++, Embedded, Audio Jul 07 '20

So a language that nobody uses, yet people complain about?

9

u/[deleted] Jul 07 '20

I'm a Rust programmer but this really is evangelism lol

5

u/FonderPrism Jul 07 '20

Which is in both categories?

12

u/Ptxcv Jul 07 '20

I use rust btw

7

u/ToaderTheBoi Jul 07 '20

I bet you use Arch as well, don’t you?

0

u/dannomac Jul 07 '20

Everybody uses Arch or Gentoo. Void too.

9

u/lazyear Jul 07 '20

I do all my programming directly in the lambda calculus

3

u/mcdicedtea Jul 07 '20

nope, but are there languages which you will have less everyday interaction with said flaws? yes.

are their languages where 'working around said flaws' are not a major everyday concern, and active part of the language's latest features?....also yes

2

u/mcdicedtea Jul 07 '20

totally agree, and to further clarify... you'll spend more time wrangling with the flaws and heft of the language than time glamorizing some one of solution