logoalt Hacker News

coliveirayesterday at 6:18 PM3 repliesview on HN

C++ is trying to make C easier to use for 40 years, and it's still not there. So I wouldn't call that easier.


Replies

jceleriertoday at 12:02 AM

how would you write something like

    #include <print>
    #include <map>
    #include <string>

    int main(int argc, char** argv) 
    {
      using namespace std::literals;

      std::string foo = "foo:";
      foo += argv[0];

      std::map<std::string, int> m{
        {foo, 123}
      , {"count: "s + std::to_string(argc), 456}
      };

      std::println("{}", m);
    }
in C
show 1 reply
astrangeyesterday at 7:35 PM

C++ is trying to make something EASIER to use?

anthkyesterday at 9:20 PM

C++ if any made C user friendly.