this post was submitted on 30 Nov 2023
-1 points (45.5% liked)

C++

1755 readers
1 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
-1
The Myth of Smart Pointers (www.logikalsolutions.com)
submitted 10 months ago by lysdexic to c/cpp
you are viewing a single comment's thread
view the rest of the comments
[โ€“] lysdexic 1 points 10 months ago (1 children)

and a subtle typo

What example can you give to illustrate that claim?

or innocent assumption

That sounds like an euphemism for "I don't know what I'm doing, so I pin my mistakes on my tools".

can lead to catastrophic failures that might only surface in 0.0001% of the times that a certain line of code is run.

I struggle to tell if you are serious.

[โ€“] 5C5C5C 2 points 10 months ago

What example can you give to illustrate that claim?

[& var1, var2](){
    /* ... */
}

when you meant to type

[&, var1, var2](){
    /* ... */
}

can lead to data races in multithreaded contexts, undefined behavior, and sporadic crashing.

I struggle to tell if you are serious.

I think you've never written multithreaded or async C++ code. Or anything particularly complex if you're unfamiliar with the issues that I'm bringing up.