Deepak K [Daksh] will be presenting the following session
filter_list help_outline
  • Deepak K [Daksh] Gupta

    Deepak K [Daksh] Gupta - Lambdas: The Functional Programming Companion of Modern C++

    45 Mins

    C++ as a Programming Languages had ruled the programming world for quite some time. It was so much synonymous to Object Oriented Programming that when functional programming came into the picture, nobody initially thought of C++ as a candidate for the same.

    Fortunately, the C++ Standardization ( committee had a different idea and they later came up with C++11 which was a paradigm shift in the language. C++ now not only allows programmers to write functional code, but it has also evolved the language into a meta programming language.

    The core of these changes which enables functional programming in C++ revolves around the introduction of Lambdas. Suddenly, with lambdas, we’re not only writing functional code in C++ but can also have functional threads, functional locks, and functional memory management.

    The beauty of lambdas can also be judged from the fact that it has also made many of the STL (Standard Template Library) algorithms functional which, along with the concepts and ideas of Closures makes C++ an ideal candidate to be considered for writing functional codes which includes immutability, Partial function specialization, and pattern matching.

    In this talk, I’ll take you on the journey of functional Programming in modern C++ and how to write awesome and simple C++ code which conforms to all tenets of Functional Programming.

    The talk shall contain full fledged examples which shall be made available to participants post conference

    We’ll also see how the language has evolved and why it’s still a favorite for doing performance intensive jobs which we can, of course, do in a functional way

1. What got you into Functional Programming (FP)?

I got into functional programming while exploring Scala language for one of my projects.

Though Scala also supports Object-Oriented programming, it does provide you the flexibility of FP. 

Later, I applied the concepts of FP in C++ Programming language and using it on a regular basis.

2. What has been your best moment or highlight working with FP?

No doubt, writing a near pure functional code in C++ was an amazing experience for me. It's not that what I did couldn't be done by using Object Oriented or even procedural programs, but Functional Programming forces you to think in a different way.

I've end up creating one of the most complex, critical multithreaded software with real time requirements using functional C++.

3. What are some of the greatest challenges of working with FP?

Understanding and migrating to FP after writing OO and Procedural code for a long time. It was even more difficult to make people understand what it is and why we must consider it for the work we are doing? This was especially true for writing software for Multi-Core, Multi CPU's platforms.

4. All the mainstream programming languages are adding functional programming features. Most new languages and frameworks are strongly influenced by FP. What is your advice to object-oriented programmers?

Learn and understand Functional Programming, It's useful in many scenarios, but it's NOT a total replacement of OOP.

There are still things which you can do with OOP. Please don't listen to people who sell "One Solution Fits All".

5. What will be some of the key takeaways from your sessions at the conference?

As per the draft schedule, my session is the only one that talks about using Functional Programming in a language like C++.

Based on my own interaction with people across community there is a general feeling that they need to migrate to FP languages to take the benefits of FP.

I believe the key takeaway from my session will be that "You can also do it in the language you've been using for years"

6. The conference has more than 50 sessions. Which ones are you most looking forward to attending and why?

I'm looking forward to attending "Building an E-Commerce Marketplace Middleware in Clojure" by Tamizhvendan S. I'm exploring Clojure for one of my upcoming work and will be very much interested in this case study