←back to thread

In Defense of C++

(dayvster.com)
185 points todsacerdoti | 1 comments | | HN request time: 0s | source
Show context
lordleft ◴[] No.45267931[source]
Great article. Modern C++ has come a really long way. I think lots of people have no idea about the newer features of the standard library and how much they minimize footguns.
replies(2): >>45268114 #>>45268712 #
sunshowers ◴[] No.45268114[source]
Lambdas, a modern C++ feature, can borrow from the stack and escape the stack. (This led to one of the more memorable bugs I've been part of debugging.) It's hard to take any claims about modern C++ seriously when the WG thought this was an acceptable feature to ship.

Of course, the article doesn't mention lambdas.

replies(4): >>45268264 #>>45268485 #>>45268512 #>>45274413 #
im3w1l ◴[] No.45268264[source]
Why wouldn't it be acceptable to ship? This is how everything works in C++. You always have to mind your references.
replies(2): >>45268326 #>>45269016 #
sunshowers ◴[] No.45268326[source]
Exactly! This is my problem with the C++ community's culture. At no point is safety put first.
replies(2): >>45268649 #>>45268867 #
1. Yoric ◴[] No.45268649[source]
Yeah, it's great that the C++ community starts to take safety in consideration, but one has to admit that safety always comes as the last priority, behind compatibility, convenience, performance and expressiveness.