Live data from Hacker News

Retiring a favourite C++ joke

ignition-training.com

21–30 of 151 posts

Re: Retiring a favourite C++ joke

#22

There's dozens of people who would get it... DOZENS!

According to the TIOBE index, C++ is the fourth most popular programming language, and has been around for over 35 years, so easily a couple thousand people. The question is how many of them are on HN (probably dozens).

Re: Retiring a favourite C++ joke

#25

My favorite C++ joke is: Have you heard about the new object-oriented version of COBOL? It’s called “ADD 1 TO COBOL”

That's more like ++C. You need "ADD 1 TO COBOL RETURNING COBOL"... which elicits another C++ joke: that it would have been nice to get to use the better version, but someone used the wrong operator, so what we have is certainly complicated but probably just more of the same.

Re: Retiring a favourite C++ joke

#27

    #include 

    using namespace std;

    class BadProgrammer {
    public:
      void yep() {
        delete this;
      }
    };

    int main() {
      auto x = BadProgrammer{};

      x.yep();

      cout 
g++ -Wall -Wextra -Wpedantic main.cc # compiles just fine

clang++ -Wall -Wextra -Wpedantic main.cc # also compiles just fine

Re: Retiring a favourite C++ joke

#29
post #22

There's dozens of people who would get it... DOZENS!

According to the TIOBE index, C++ is the fourth most popular programming language, and has been around for over 35 years, so easily a couple thousand people. The question is how many of them are on HN (probably dozens).

Either you did not get the joke, or I did not get your joke.

Re: Retiring a favourite C++ joke

#30

There's dozens of people who would get it... DOZENS!

Uses C++. Shortly after: I've made a huge mistake.

Tobias: You know, Lindsay, as a developer, I have advised... a number of people to explore "modern C++," where everything is RAII, and you never have to write `new` or `delete`.

Lindsay: Well, did it work for those people?

Tobias: No, it never does. I mean, these people somehow delude themselves into thinking it might, but... but it might work for us.

Post reply on HN