Lightning Talk: Forbidden C++ - Ali Almutawa - CppCon 2023

Поділитися
Вставка
  • Опубліковано 26 сер 2024
  • cppcon.org/
    ---
    Lightning Talk: Forbidden C++ - Ali Almutawa - CppCon 2023
    github.com/Cpp...
    We're gonna go through 15 screenshots of forbidden C++ code that should never be written in an actual codebase.
    ---
    Ali Almutawa
    I've worked in the University of Colorado Boulder as a Learning Assistant CSCI 1300 (the intro course) and CSCI 3104 (Algorithms).
    ---
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
    UA-cam Channel Managed by Digital Medium Ltd: events.digital...
    ---
    Registration for CppCon: cppcon.org/reg...
    #cppcon #cppprogramming #cpp

КОМЕНТАРІ • 15

  • @xtra-medium
    @xtra-medium 2 місяці тому +13

    3:26
    Note that it IS possible to explicitly specify a template argument for a generic lambda, you just have to spell out the call operator:
    ```
    auto lambda = []< typename T >(){ return T{}; };
    auto result = lambda.operator()< float >();
    ```

    • @314Labs
      @314Labs 2 місяці тому +1

      Would it be possible to specify the template argument in a IIFE?

    • @user-gr8fg4ub4v
      @user-gr8fg4ub4v 2 місяці тому +3

      oh!
      auto v = [](T){ return 2 + 2; }.operator()(1);

  • @fzort
    @fzort Місяць тому +3

    Fun talk, I learned something.

  • @tomekczajka
    @tomekczajka 2 місяці тому +15

    Interesting how a lot of cppcon talks are about how horrible the C++ language is.

    • @fareloz
      @fareloz 16 днів тому

      Great power comes with great responsibility

  • @SomebodyHere-cm8dj
    @SomebodyHere-cm8dj 2 місяці тому +4

    I wrote a particularly evil function function the other day, that takes a uint16_t the other day and calls a function that takes the entered number as its template parameter, generating all the if statements with templates and recursive calls.

  • @slava6105
    @slava6105 2 місяці тому +5

    Alright.
    Now going back to c11...

  • @destiny_02
    @destiny_02 2 місяці тому +1

    Amen

  • @Samsom321
    @Samsom321 Місяць тому +2

    How to make C++ code unreadable with zero semantics gain! 😂

  • @arizvisa
    @arizvisa 5 днів тому

    glad to not have to write c++ anymore. would rather reverse it anyways...

  • @MrAbrazildo
    @MrAbrazildo 2 місяці тому +2

    1:25, and the memory wasn't initialized.

    • @learpcss9569
      @learpcss9569 2 місяці тому +2

      does it matter for in the context of a question?

  • @onebronx
    @onebronx 2 місяці тому +3

    Wasted time

  • @carneirouece
    @carneirouece 2 місяці тому +1

    is there something more annoying than vocal fry?