Lightning Talk: Into the Lambdaverse - The Beginning - Timur Doumler and Fedor Pikus - CppNow 2023

Sdílet
Vložit
  • čas přidán 5. 10. 2023
  • www.cppnow.org​
    / cppnow
    ---
    Lightning Talk: Into the Lambdaverse - The Beginning - Timur Doumler and Fedor Pikus - CppNow 2023
    ---
    Fedor Pikus and Timur Doumler discuss some weird C++ code involving lambdas on the blackboard.
    ---
    Timur Doumler
    Timur Doumler is the Developer Advocate for C++ tools at JetBrains and co-host of CppCast. He is an active member of the ISO C++ standard committee, where he is currently co-chair of the Contracts study group. As a developer, he worked many years in the audio and music technology industry and co-founded the music tech startup Cradle. Timur is passionate about clean code, good tools, low latency, and the evolution of the C++ language.
    ---
    Fedor Pikus
    Fedor G Pikus is a Technical Fellow and head of the Advanced Projects Team in Siemens Digital Industries Software. His responsibilities include planning the long-term technical direction of Calibre products, directing and training the engineers who work on these products, design, and architecture of the software, and researching new design and software technologies.
    His earlier positions included a Chief Scientist at Mentor Graphics (acquired by Siemens Software), a Senior Software Engineer at Google, and a Chief Software Architect for Calibre PERC, LVS, and DFM at Mentor Graphics. He joined Mentor Graphics in 1998 when he made a switch from academic research in computational physics to the software industry.
    Fedor is a recognized expert in high-performance computing and C++. He is the author of two books on C++ and software design, has presented his works at CPPNow, CPPCon, SD West, DesignCon, and in software development journals, and is also an O'Reilly author. Fedor has over 30 patents and over 100 papers and conference presentations on physics, EDA, software design, and C++ language.
    ---
    Video Sponsors: think-cell and Bloomberg Engineering
    Audience Audio Sponsors: Innoplex and Maryland Research Institute
    ---
    Videos Filmed & Edited By Bash Films: bashfilms.com/
    CZcams Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
    ---
    CppNow 2024
    www.cppnow.org​
    / cppnow
    #boost #cpp #coding #lambda
  • Věda a technologie

Komentáře • 6

  • @budiardjo6610
    @budiardjo6610 Před 13 dny

    wow, best duo

  • @ABaumstumpf
    @ABaumstumpf Před 8 měsíci +6

    Not a language-lawyer but i am pretty sure the answer is easy:
    the capture "[n=n]" is a non-static initializer that acts AS-IF declared with "auto". so it behaves like "auto n = n;" just that the right-side "n" refers to the captured outside value ( in a normal block the compiler would complain that the right 'n' is used before auto has deduced the type).
    And "auto" (for whatever strange reason) does not deduce the full type and leaves out cv-qualifiers - so this newly declared 'n' is the same as "int n" - not const.

    • @vaughncato
      @vaughncato Před 5 měsíci +1

      Yes, I believe the wording in the standard was just confusing. The speakers seem to be using the "except if the capture is by copy ... two different ways of referring to the same object ...", as an indication that [n=n] means the same thing as [n]. But what the standard is trying to say is that it logically creates a variable outside the lambda and then captures it inside, which would imply a copy, but that copy doesn't actually happen.

  • @sritharan20
    @sritharan20 Před 8 měsíci +2

    wow timur and fedor, niceeee

  • @GeorgeTsiros
    @GeorgeTsiros Před 5 měsíci

    and we see that the problem we _programmers_ face is not the standard
    but the _compiler_
    Understanding the standard is pointless when the compilers we use do whatever. There should be either a certification for the compiler so we have a guarantee that the compiler _at least_ tries to follow the standard.

  • @ikk9000
    @ikk9000 Před 8 měsíci

    they explaining it backwards. it's about whenever it's captured by reference or by copy. in both cases the capture variable is a member of an intermediate lambda class. when lambda is non-mutable, the copied variable is const and that way it can't be modified. that next part about capturing by using n=n as the capture i'm not going to talk about.