/dpt/ - Daily Programming Thread

I don’t have one :(. I do run my own company though. Should make about $50,000 in revenue this year.

You can't cast a pointer to a reference, you can only cast a dereferenced one. Your code doesn't even compile.
Smiley &rs = dynamic_cast(*c);

yea sorry I just noticed that, that's what I meant to write
but it would still give a bad cast because it's not the expected type, right?
this is why I'm asking, if you must know
>bruv your literal example code doesn't make sense

Attached: SumatraPDF_2019-04-15_18-25-27.jpg (676x850, 134K)

#define CCRITICAL(s, f, ...) if ((s) = ((f)(__VA_ARGS__))) do { \
fprintf(stderr, "Error in %s on %d in %s:", __func__, __LINE__, __FILE__); \
fprintf(stderr, "%s(%s) == %d\n", #f, #__VA_ARGS__, (s)); \
exit(1); \
} while (0)
#else

Is this good practice? I hate having to write out stuff like
if (status = f(x, y))
CRITICAL("failed to call f (%d)", status);

It'd be much cleaner to write
CCRITICAL(status, f, x, y);

D a shit.

Attached: 1551914022563.jpg (240x320, 26K)

Post your GitHub so I can contribute

Attached: 1540440373567.png (494x795, 411K)

github.com/awesomekling

I still have no projects

Attached: 1448740035264.jpg (1920x1080, 174K)

>Gustedt: At the language and library level, the part that is directly visible to programmers, not much is decided for now. We are really open to see what people bring in. My expectation is that we will see some C++ features integrated into C, such as attributes, compile time constants for all data types in one form or another, and perhaps initialization-induced types (AKA C++’s auto feature). Also there is a coordinated initiative with C++ for a new calling convention that could supersede the crude errno error return convention that we are dragging with us since the beginning. There are several people who ensure liaison with the C++ committee and they do an excellent job on these issues.

>But the C standard has another important role because it basically sets the machine model on which our computer architectures and also other programming languages build. The C standard calls this the “abstract state machine”. As an important feature here we have already voted the integration of the latest IEEE floating point specifications into the C standard. We also have formed a working group to revise the “memory model”, that is how programmers may or may not directly interact with the bare representation of data in the computer’s memory, how this may influence possible optimizations, and how such byte- and bit-level fiddling can be made safe and secure. This work follows Peter Sewell’s (et al.) papers on “pointer provenance” and we hope that we will end up with a memory model that is a suitable common ground for the diversity of system software and applications that C serves.

Only three more years until Rust gets BTFO and C reclaims its rightful throne

I have a retarded question, do various Programming language have different speed of writing something in the console?

What i mean is if i tell Python to write A a thousand times will it do it slower or the same as if done in C++ or Rust or whatever faster language there is

Attached: 367373467.jpg (477x477, 41K)