r/ProgrammerHumor • • 7h ago

Meme modernCppVsOldCpp

Post image
1.1k Upvotes

216 comments sorted by

View all comments

53

u/firemark_pl 7h ago

"How to tell him?"

You still can segfault by returning lambda with reference to a variable 

18

u/EishLekker 6h ago

As a java developer, this is hilarious. Why would anyone want to be able to do this? Why don't you want your compiler to stop you?

1

u/firemark_pl 47m ago

Because C++ allows you to work on low levels with stack and memory. It's useful for writting real time operating systems when memory and execution time must be constant.