The Best Parts of C++ - Jason Turner - CppNorth 2022

Sdílet
Vložit
  • čas přidán 30. 08. 2022
  • CppNorth Twitter: / cppnorth
    CppNorth Website: cppnorth.ca/
    ---
    The Best Parts of C++ - Jason Turner - CppNorth 2022
    Slides:github.com/CppNorth/CppNorth_...
    CppNorth 2022 video sponsors:
    think-cell: www.think-cell.com/en/
    Adobe: cppatadobe.splashthat.com/
    C++ is a big language, and it gets bigger every year. Is C++ it too big? Do we just continue to make the language harder to learn? Or, perhaps, do these language additions actually make the language better and easier to use? We will take a pragmatic look at the changes brought to C++ over the years and what impact they have had on how we write code.
    ---
    Jason Turner
    Jason is host of the CZcams channel C++Weekly, co-host emeritus of the podcast CppCast, author of C++ Best Practices, and author of the first casual puzzle books designed to teach C++ fundamentals while having fun!
    ---
    CZcams Channel Managed By Digital Medium Ltd: events.digital-medium.co.uk
    ---
    #Programming​ #Cpp​ #CppNorth
  • Věda a technologie

Komentáře • 18

  • @rohrbold
    @rohrbold Před rokem +4

    This was really entertaining. Thanks Jason.

  • @peterevans6752
    @peterevans6752 Před rokem +1

    Way to make C++ standards history and feature introduction engaging Jason!

  • @Rye0117
    @Rye0117 Před rokem +1

    Great talk. Good reminder of what we've got in our arsenal. And audiences are nice!
    One thing I can come up with at this moment that is not mentioned in the talk would be Argument Dependent Lookup. You can't be ignorant of it to play with templates. It's fire!

  • @xealit
    @xealit Před 4 měsíci

    Good clear points. On another hand, it's a bit depressing how 20 years of the language went into just getting rid of redundant typing in C++03 for loops with a bunch of new concepts and new syntax. And it skips all the gotchas along the way.

  • @nandanvasudevan
    @nandanvasudevan Před rokem +3

    Why is the video of the speaker not shown? In Jason's other talk I can see Jason...

    • @colugo5172
      @colugo5172 Před rokem

      @@cppnorth thank you for the event

    • @pdany86
      @pdany86 Před rokem +1

      Would Minecraft Jason be enough? :)

  • @mirralisdias6630
    @mirralisdias6630 Před rokem

    At 52:08, do we get a default move ctor / move assignment operator? Aren't they not declared by the compiler when the user explicitly declares a dtor?

    • @stragerneds
      @stragerneds Před rokem

      I think you're right. In this case, the move operation calls the Double_Data::Double_Data(const Double_Data&) overload (i.e. the copy constructor) (assuming NRVO didn't kick in first).

  • @IgnoreSolutions
    @IgnoreSolutions Před rokem

    11:50 you think he's joking but that's an actual and legitimate strategy for bringing templates into C....

  • @victotronics
    @victotronics Před rokem +1

    Why is it an "amazing feature of std::array" that it doesn't have a constructor? It makes my code very inelegant: imagine a class constructor that takes a std::array as argument, then you can not pass it a braced list of the elements.
    Constexpr: is "constexpr pi = 4*atan(1.0)" going to work in C++29 or so?

    • @masondeross
      @masondeross Před rokem

      If you want to keep track on that progress, here is the proposal for constexpr cmath functions www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1383r0.pdf otherwise constexpr third party math libraries do exist currently. I doubt your exact syntax will ever work, but if you add auto/double etc after constexpr, then you are just a constexpr function call away. The real issue you should be complaining about is that `if constexpr` doesn't work outside of method scopes; that's the real tragedy of constexpr's current implementation.

  • @fredianoziglio3206
    @fredianoziglio3206 Před rokem

    At minute 25 I think calculate_pi should return 22./7, not 22/7.

  • @mordberg
    @mordberg Před rokem +3

    Great talk!
    Can't agree with `const` being one of the best features though. The way the language let's you express read-only memory is just plain horrible.

  • @olafschluter706
    @olafschluter706 Před 3 měsíci

    Nice talk but wrong in so many ways that I am not interested to discuss. It its a very opinionated talk about what are the strength of C++. Lot's of love for auto but no mentioning what so ever for smart pointers, which are way more important to write sound code.
    And being standardised isn't really helping in writing good software. It is just helping in writing portable software. And it is somewhat dismissed by available compilers not implementing standards. Most of the time you need to figure out by experiment what your C++ compiler is able to do. Programming languages where there is only one compiler available, which is constructed by the people designing the language, set their standards by implementation. I prefer that way. I never was disappointed by a rust or swift compiler - but I found that I was very dependent on the specific version of gcc or clang to use C++ "standard" features. E.g. C++ has modules since C++20, but even setting your compiler standard to c++23 won't make it work with cmake, as the way to process modules and link to them is very compiler specific. As of now it isn't something to rely on for production code, at least not of production code supposed to be portable. If one goes into the list of supported C++ features of gcc or clang on the internet, one will find a mess. Standards do not help C++ as compiler vendors seem to adopt to them just as they feel like it.