addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Fun with Lambdas: C++14 Style

If virtual functions in C++ imply design patterns, then C++ lambdas imply what? What does it really mean to have lambdas in C++? Frankly, I don't know but I've a hunch: It's BIG.

Just like virtual functions open doors to the OO paradigm, lambdas open doors to a different paradigm--the functional paradigm. This talk is not a praise of functional programming or some elusive lambda-based library. (Although, I'll mention one briefly that tops my list these days.) Instead, the goal is to have fun while working our way through some mind-bending examples of C++14 lambdas. Beware, your brain will hurt!  Bring your laptop and code the examples right along because that may be the fastest way to answer the quiz.


Sumant Tambe is a Multi-Paradigm System Engineer and a Microsoft Visual C++ MVP. He works for Real-Time Innovations in California where he spends most of his time dabbling into standards-based data distribution middleware for real-time systems. He enjoys solving interesting problems where systems and powerful software abstractions meet. Sumant is also a blogger (C++ Truths), author (More C++ Idioms), open-source developer, father, and a gamer (PS3).  

Join or login to comment.

  • Vivek

    Great learning last evening. Thanks a bunch. Sumant - In case you have any other resources for Lambdas on C++14, please do share. The slides themselves are invaluable.

    March 13, 2014

  • Anton

    Thank you for the great speech and examples

    March 13, 2014

  • Sumant T.

    Thank you all! Great questions last night. Looking forward to seeing you all to the follow up meetup in April.

    March 13, 2014

  • Steven W.

    Very enjoyable.

    March 13, 2014

  • John D.

    I can't wait to start using the new features of C++ 14. The syntax is concise and, as was demonstrated by the speaker, the idioms in the new language will expand even further to make writing clean concise code a breeze. Great talk!

    March 13, 2014

  • Iker J.

    This link explains all the syntax and options with lambdas very well along with how they operate compared to Objective-C blocks. I though I should share it with you all iOS lovers ;) https://mikeash.com/pyblog/friday-qa-2011-06-03-objective-c-blocks-vs-c0x-lambdas-fight.html

    March 12, 2014

    • Mehdi A.

      This one is for C++ programmers that are not iOS lovers ;) http://www.cprogrammi...­

      In my opinion one key point to understand lambda is to keep in mind that in fact it *is* syntactic sugar (sorry Sumant ;-)). And I feel most of the discussions and questions from the audience could been easily answered by showing the equivalent C++03 function object constructs.

      The mutable thing seems still tricky/dangerous to me though...

      March 12, 2014

  • Srinath A.

    Will we have the slides / video shared?

    March 12, 2014

    • Sumant T.

      Slides only. I don't think it will be recorded.

      March 12, 2014

  • A former member
    A former member

    A couple logistic-related questions:
    1. Are the bikes allowed inside the building? Don't have a bike lock yet :(
    2. Any rough estimate of the duration? Just to be able to plan out the rest of the night.
    Thanks!

    March 12, 2014

    • A former member
      A former member

      One of us routinely brings his bike inside. I haven't witnessed any issues yet. I hope to remember to bring a bike lock.

      March 12, 2014

    • A former member
      A former member

      Thanks for the info Jon! Looks like I can rest assured there won't be any issue with the bike.
      Thanks so much Ali! But please don't bother - given what Jon and you have said, I should be able to just take it inside, or, in the worst case, to be always watching it :)

      March 12, 2014

  • Dimitre P.

    Would slides be made available afterwards? I'm very excited about this talk but something came up at home last minute and will have to miss the talk.

    March 12, 2014

  • A former member
    A former member

    Sumant Tambe has noted that the audience who would like to bring their laptops to work with the examples should come to the presentation with the following tools installed:

    Clang 3.4
    gcc 4.9

    Thank you,
    Ali

    March 11, 2014

  • Sumant T.

    No C++ background required for this talk! If you have any, that is probably *not* going to be useful!

    March 10, 2014

  • Sumant T.

    We will discuss code that will make you wonder if it is C++ at all. C++14 is not your father's C++. So bring a modern compiler (a.k.a. Clang) with you to make sure you are in a C++ talk!

    March 6, 2014

  • Dhrumeel B.

    Has the location for the Lambdas meetup changed, or is it still scheduled to be at Symantec?

    March 4, 2014

    • Jon K.

      The correct location is the Symantec Cafe. I mistakenly told people that it would be at Axcient, but that will happen for the April meeting, not this month.

      1 · March 4, 2014

  • Sumant T.

    Question for you. If virtual functions imply design patterns, then C++ lambdas imply ----? What does it really mean to have lambdas in C++? Frankly, I don't know! But I've a hunch: It's BIG. This talk is not about some elusive killer lambda-based library. Instead, the goal is to have fun using lambdas in interesting ways. In this talk, your brain will hurt! Bring your laptop and code the examples right along because that may be the fastest way to answer the quiz!

    February 13, 2014

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy