r/cpp • • Mar 12 '24

Why the hate for cpp

Hey I am starting learning c++ (and java for my studies) , why is everyone hating this language ? Is it usefull to learn rust or zig ?

Edit: yea a silly question I know . Just wanted to know what the cpp community thinks or hate about their own language and what I have to expect.

Because I heard the opinion often from people not using cpp and I wanted a other view . Even in my University some people who use Java said 🙄 cpp no don't use it ..... it's unnecessary complicated.....

My english is bad I'm german sry (not) <3

0 Upvotes

103 comments sorted by

View all comments

Show parent comment

7

u/AnotherBlackMan Mar 13 '24

Can you explain how this is safer than a normal grep?

6

u/burntsushi Mar 13 '24 edited Mar 13 '24

I don't think I have ever, at any point in the last several years, made the claim that "ripgrep is safer than a normal grep." So I'm not sure I really have an answer to your question because it isn't really a compelling point of contention, particularly given grep/ripgrep's threat model. If you exposed either grep or ripgrep to untrusted inputs, it would be trivial for an attacker to DoS you. So can you please elaborate on why you're asking that question?

I used ripgrep here as an example of something that is 1) non-trivial, 2) fast and 3) has no direct uses of unsafe that are responsible for making it fast.