Belle Views on C++ Ranges, their Details and the Devil - Nico Josuttis - Keynote Meeting C++ 2022

แชร์
ฝัง

ความคิดเห็น • 33

  • @pocsbe
    @pocsbe ปีที่แล้ว +22

    C++ needs more people like Nico Josuttis. We need more critical eyes on the standard library (and the language). Great speaker, honest and to-the-point. Thank you Nico!

    • @igagis
      @igagis ปีที่แล้ว

      Hi :)

  • @jangolab
    @jangolab 11 หลายเดือนก่อน +5

    This whole situation is absolutely worrisome for the future of C++! We have arrived at a point where the committee feels the need to protect us from potentially inefficient valid code, and as a side effect ends up inducing us to semantic errors. Kudos to Nico for being vocal about this and for taking the initiative of proposing and implementing an alternative. (An ironic sidenote though: a few years ago Andrei complained about the standardization of constexpr if, to which Nico responded something on the lines of "shame on you for not getting more involved with the committee". Glad to see Nico has found some value in complaining and in not being corporatist.)

  • @DavidWright-fq3di
    @DavidWright-fq3di ปีที่แล้ว +12

    We were at that conference and I must say this has really shaken up my coworkers and me 😬 We were really excited about using range views, and we've come to the conclusion we still can, but we need to be very careful about it. Sad to see that range-v3 has taken the same decision.

  • @m7627
    @m7627 ปีที่แล้ว +15

    Great talk! A bit depressing at moments, but still very interesting and informative.

  • @enricomariadeangelis2130
    @enricomariadeangelis2130 11 วันที่ผ่านมา

    "Once you understand the error, you understand the error message". So true :D

  • @juliendebache4965
    @juliendebache4965 ปีที่แล้ว +2

    As a beginner, please keep doing what you are doing!

  • @Luca-yy4zh
    @Luca-yy4zh ปีที่แล้ว +7

    Great talk! I feel now a bit of frustration when I try to use std::views

  • @userrand4900
    @userrand4900 11 หลายเดือนก่อน

    Slide 9 is interesting, while you cannot add a string and an integer (v = v + int_val) won't work, you can append an integer to a string via += operator overload.

  • @rareshb
    @rareshb ปีที่แล้ว +6

    I am going to call std::jthread a Josuttis thread from now on.

  • @danieloberhoff1
    @danieloberhoff1 7 หลายเดือนก่อน

    hi nico! you made jthread? yay, I love that! :)

  • @kuhluhOG
    @kuhluhOG ปีที่แล้ว +3

    1:51:19 "Too much criticism"
    If you would throw around with curse words or make stuff up, a rejection would be understandable.
    But you don't.
    And where I come from, such behaviour (not wanting to deal with valid criticism) is regarded as just one thing: immature.
    Sometimes also called kindergarden behaviour.
    While this is tolerated for hobbies (mostly), C++ is used in situations where sometimes people's live literally depend on it working properly. Because of that such behaviour is just straight up not tolerated here.

  • @Key_Capz_
    @Key_Capz_ ปีที่แล้ว +1

    Interesting

  • @danieloberhoff1
    @danieloberhoff1 7 หลายเดือนก่อน

    hmm, doesnt the threading code race to destruction? i.e. it will likely not even finish the work...

  • @Voltra_
    @Voltra_ 9 หลายเดือนก่อน

    Interesting to see that views are not views

  • @superscatboy
    @superscatboy ปีที่แล้ว +3

    Pretty sobering stuff.

  • @faridmehrabi2761
    @faridmehrabi2761 ปีที่แล้ว +4

    I winder as a teacher, how you are going to teach coroutines. IMHO It was great feature with terribly awkward finishing. I -for one - am really reluctant to use naked coroutines in current form; reserve the luxury for standard library developers.

    • @MeetingCPP
      @MeetingCPP  ปีที่แล้ว

      I think what the standard offers right now is not for the masses. Next standard versions should improve on this.

    • @faridmehrabi2761
      @faridmehrabi2761 ปีที่แล้ว +3

      @@MeetingCPP
      I don't mean the libraray. The very definition of the coroutine itself is now over-complicated. Simpler syntax/semantics for a very basic coroutine is possible IMO. In its current shape, it is by no means similar to any fundamental programing concept. Too abstract a thing with lots of unnecessary coupling with many unnecessary and unrelated aspects: Memory management, error handling, generic programing, special std library identifiers; basically a Frankenstein of all beasts in C++. Not a good starting point to attract and teach new programmers. I wish an alternate way to define coroutines were introduced to the core language. I do not mean a massive boilerplate library (those could be done without a formal definition of coroutines, using implementation defined blackboxes). It is best to be able to define a coroutine without ever refering to any identifiers in `std` or 3rd party libraries.

    • @nurso56
      @nurso56 ปีที่แล้ว

      @@faridmehrabi2761 Totally agree in this point. A very basic coroutine with easy to learn and easy to use syntax is needed. Sure, there might be use cases or corner cases which are not possible with such a basic version, but that corner cases could be omitted in the first place and added later with an opt-in complex coroutine.
      As I saw now several videos/tutorials what you all have to implement and most of the things come out of no where, e.g., the compiler requires that type X in class Y exists (ok, which 100 types I must/can/should implement then and what options do I have?), its a real mess. At the end you are writing 100 and 100 lines of code instead of writing only 10 lines without coroutines. A coroutine is not much more than class with methods and a state (its members). I really think, the coroutines of C++ are useless, similar to std::regex what is also useless but for performance reasons.

    • @faridmehrabi2761
      @faridmehrabi2761 ปีที่แล้ว

      @@nurso56
      I can make some propositions; but I don't have any audience, not much feedback, not a voice in general. I can do it with one single keyword and a minor syntax addition, and get most of the required functionality and requirements(omitting the memory and exception handling stuff). It can have a slightly different name than coroutines, as a simpler alternative.

    • @svaira
      @svaira ปีที่แล้ว

      @@faridmehrabi2761 What about C-style static variables, like
      int counter(void) {
      static int nr = 0;
      return nr++;
      }
      Isn't that already a simple way of doing basic coroutines, or is there something missing with it?

  • @vladimiro3059
    @vladimiro3059 ปีที่แล้ว

    why repo is disabled?

    • @MeetingCPP
      @MeetingCPP  ปีที่แล้ว +1

      Licensing issues... (GPL code...)

    • @vladimiro3059
      @vladimiro3059 ปีที่แล้ว

      @@MeetingCPP ok thanks
      In which part of the library it was used GPL code. Just wondering for the purpose of knowledge.

    • @MeetingCPP
      @MeetingCPP  ปีที่แล้ว +1

      Nico had modified parts of an STL implementation under GPL and added part of this code to his own library if I remember correctly.

    • @vladimiro3059
      @vladimiro3059 ปีที่แล้ว

      @@MeetingCPP ok. Thank you. That make sense.

  • @PaulDiracTWR
    @PaulDiracTWR ปีที่แล้ว +1

    lmao at the first guy wearing a freaking contraption on the face.
    Great talk though, very informative, thanks for making it available. I'm reading C++20 Complete Guide by Nico atm, very useful.

    • @MeetingCPP
      @MeetingCPP  ปีที่แล้ว +13

      As the conference organizer I had to make sure not to get sick during or after the conference. So Mask all day it was.

    • @PaulDiracTWR
      @PaulDiracTWR ปีที่แล้ว

      @@MeetingCPP Thank you for organizing, I watched some of the lectures and Andrei/Sean AMAs and they were great. It's greatly appreciated.

  • @ThunderAppeal
    @ThunderAppeal ปีที่แล้ว

    Fascinating.
    Where was this guy the 8 years prior to feb 2022?
    For 8 years kiev had been bombarding its own civilians in eastern yukraine.