CppCon 2016: Gor Nishanov “C++ Coroutines: Under the covers"

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 16

  • @YourCRTube
    @YourCRTube 8 лет назад +25

    How hasn't anyone commented yet, how amazing this all is. With such aggressive optimizations possible, other uses will become popular, like the await on optional for instance. Quite exciting.

    • @TimTeatro
      @TimTeatro 7 лет назад +3

      You're not wrong. But coroutines and lazy evaluation are something of a banality among modern languages. It's absolutely wonderful that C++ is getting it, but it has been a long time coming.

    • @Omnifarious0
      @Omnifarious0 7 лет назад

      I think, until the word 'await' began to be used that this was considered a frou-frou language feature that only computer scientists would care about that had no practical application. For example, Python could've had co-routines nearly a decade ago when Stackless was a thing. But Guido didn't understand how they would be useful because nobody had ever used the word 'await'.
      What's sort of amusing is that 'await' isn't exactly what's happening there, but it's close enough that it leads people who don't really know what's going on use it in the correct way.

    • @Omnifarious0
      @Omnifarious0 7 лет назад +4

      And, I don't think this implementation is the correct one for C/C++. Coroutines shouldn't do any dynamic allocation at all except when one is being created as a top-level 'task'.
      Though my proposed implementation would make generators a bit more of a pain, sort of.

    • @YourCRTube
      @YourCRTube 7 лет назад +1

      I have to agree hidden allocation got a bit out of control in modern c++. That's why I was happy to see a good compiler can eliminate so much overhead.

    • @JiveDadson
      @JiveDadson 6 лет назад

      May 2018. VC++ creates a couple of screens of asm for that "disappearing" example. Catch up, Microsoft!

  • @dexterman6361
    @dexterman6361 3 месяца назад

    Wow this talk really demystified many things about coroutines. The pseudocode was amazing to build a mental model of what's happening. This talk and James McNellis' talk are really amazing!
    Honestly surprised other coroutine talks don't cover it this way. Well I guess to others maybe the other talks were more helpful.
    But these 2 talks, * chefs kiss * perfect. I think the pieces are falling into place in my head. Time to see what other footguns this opens up haha.

  • @cliffmathew
    @cliffmathew 2 года назад +1

    Excellent demonstration. Thank you

  • @nadoelik
    @nadoelik 2 года назад +1

    Great talk

  • @MNTR108
    @MNTR108 7 лет назад +1

    про тебя в Юте писали, за 1989 год, молодец )

  • @connorhorman
    @connorhorman 6 лет назад +3

    light theme vscode WutFace

  • @dosomething3
    @dosomething3 8 лет назад +2

    He's just typing and not explaining.

    • @TimTeatro
      @TimTeatro 7 лет назад +19

      In fairness, the talk is about the implementation and optimisation of coroutines, not an introduction to the topic. It's an hour talk, and he spent less than 10-minutes in the editor. You couldn't have spent long watching the video before commenting.

    • @junaid1464
      @junaid1464 6 лет назад +10

      He explained it really well!.