Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xedrac
10 months ago
|
parent
|
context
|
favorite
| on:
Improvements to static analysis in GCC 14
> The use of goto is unambiguously correct and elegant in some contexts.
For C, absolutely. For C++, it's likely a footgun.
jandrewrogers
10 months ago
[–]
It has fewer use cases in C++ but it still has use cases where the alternatives are worse.
xedrac
10 months ago
|
parent
[–]
What is a C++ use case where RAII doesn't solve the problem better? I imagine one exists, but I've never encountered it in 20 years. Conversely, I've seen it used inappropriately for cleanup many times (which would be fine in C).
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
For C, absolutely. For C++, it's likely a footgun.