• @SleveMcDichael
    link
    English
    142 months ago

    C++ is pretty alright, IMO, but the syntax is kinda clunky though, I think probably because of some historical baggage.

    • @[email protected]
      link
      fedilink
      English
      92 months ago

      That and the weird aversion to introducing new or useful keywords, or even extending the symbol set that doesn’t even use full ASCII.

      • @[email protected]
        link
        fedilink
        English
        32 months ago

        Word! The whole snafu with co_routines has been quite the laughable show. It would have been trivially sortable if C++ did something like what PHP did, using a symbol to absolutely disambiguate what is a variable and what is not. That way eg.: await is a keyword, $await is a variable (perhaps a functor).

        To make it even better, $ is already unused in C++!

    • @suy
      link
      62 months ago

      Correct. Backwards compatibility is both its biggest asset and its bigger problem.

      In syntax alone, you can check what Herb Sutter is doing with cppfront. Specifically, the wiki page on the postfix operators is quite enlightening. It shows some interesting examples of how by making everything a postfix operator you drop the need of -> and the duality of pre/post increment and decrement operators.