Everyone has heard of functional programming (FP), but few seem to know what it is. In this video, Troy explains what features a language should have to be functional.
- [Narrator] Functional programming has many benefits.…Here are my top three.…Pure functions are simple by design…making them understandable.…Without classes and by emphasizing pure functions…our code is easier to debug and test…and since we lack mutable state,…multi-threading is achievable.…What does it mean to program in a functional style?…The answer depends on who you ask,…but here are a few common trades.…We try to avoid data mutations so all of our variables…tend to be immutable.…Immutable is just a fancy word for a constant.…
If you can't change variables, loops are difficult…to implement so recursion is preferred.…We keep functions clean and straightforward.…Functions are pure meaning they have outputs…which depend only on their inputs.…They also avoid making changes to program state…which makes them side-effect free.…We prefer using expressions to statements.…Expressions return values and can appear…on the right hand side of an equal sign.…Statements return nothing…and exist mainly to cause side effects.…
- Unit testing and functional programming
- Function and Lambda functions
- C++ templates
- Working with the Standard Template Library and Boost.Hana
- Functional reactive programming
Skill Level Intermediate
2. Functional Programming in Modern C++
3. Template Metaprogramming
4. Functional Reactive Programming
RxCpp library5m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.