This document discusses functional programming. It begins by stating that functional programming popularity has increased, with languages like F#, Haskell, Scala, Erlang and Elixir gaining popularity. Even OOP languages like C# and Java have incorporated some functional features. The document then covers key concepts of functional programming like pure functions, immutability, higher order functions and referential transparency. It discusses how C# supports a multi-paradigm approach, combining functional programming with imperative programming. Finally, it notes that functional programming is trending due to benefits for concurrency and parallel processing.
Introduction to functional programming with java 8JavaBrahman
Recently gave a presentation in a Java Meetup in Bangalore on basics of functional programming, new functional features in Java 8, and introduction to the basic concepts of functional interfaces and lambda expressions...
Remix Your Language Tooling (JSConf.eu 2012)lennartkats
JavaScript has a vivid ecosystem of a passionate developer community, libraries, and tools. New frameworks keep pushing the boundaries what you can do with it, and the language family is rapidly expanding with new cousins; TypeScript being the latest. We’re building language tooling to provide an integrated experience with static error checks, code completion, API documentation, and so on. But how can we keep up with this changing environment? Let’s talk about effectively building language tools.
Introduction to functional programming with java 8JavaBrahman
Recently gave a presentation in a Java Meetup in Bangalore on basics of functional programming, new functional features in Java 8, and introduction to the basic concepts of functional interfaces and lambda expressions...
Remix Your Language Tooling (JSConf.eu 2012)lennartkats
JavaScript has a vivid ecosystem of a passionate developer community, libraries, and tools. New frameworks keep pushing the boundaries what you can do with it, and the language family is rapidly expanding with new cousins; TypeScript being the latest. We’re building language tooling to provide an integrated experience with static error checks, code completion, API documentation, and so on. But how can we keep up with this changing environment? Let’s talk about effectively building language tools.
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
Designing function families and bundles with java's behaviors parameterisatio...Alain Lompo
User requirements are sinking sands: should we care or should we leave it to the business managers? Java’8 behaviours parameterization and lambdas help shift paradigms from business to design: here the audience will learn how to efficiently deal with the issue and make their customers smile.
Introduction to programming by MUFIX Commnitymazenet
Introduction to programming by MUFIX Commnity
keywords:programming, java, c++, INTRODUCRTION, MUFIX Community
Disclaimer:All included resources are copyrighted to their owners
Introduction to functional languages and F# for developers. Used for the presentation of the same name to the Vermont Code Camp 2 at the University of Vermont on Sept. 11, 2010 at 12:30 PM.
In this presentation following topics have been told.
1. What are translators?
2. Different types of translators.
3. working of compiler and interpreter.
4. phases of compiler.
"Code Generation in Perl" presented to Silicon Valley Perl in Santa Clara CA by Ian Kluft on September 7, 2017. The presentation surveys the landscape of code generation tools and techniques including preprocessers, compliers and model languages, as well as CPAN modules to help with those tasks. Code generation has always been useful for automation of tedious tasks. There is also some debunking of myths from science fiction about what is currently possible with code generation. No matter how much processing is involved, at some level someone still has to write the programs.
This presentation explores the benefits of functional programming, especially with respect to reliability. It presents a sample of types that allow many program invariants to be enforced by compilers. We also discuss the industrial adoption of functional programming, and conclude with a live coding demo in Scala.
Functional Programming for OO Programmers (part 1)Calvin Cheng
The Why and Benefits of Functional Programming paradigm. Part 2 with source code can be found here: http://www.slideshare.net/calvinchengx/functional-programming-for-oo-programmers-part-2
Related source code https://github.com/calvinchengx/learnhaskell
[4DEV] Bartosz Sokół - Functional developer in object oriented world - how F#...PROIDEA
Object-oriented programming languages have been here for decades, helping millions of developers to deliver (sort of) working software. Still, after many years, we still struggle with things like nulls and exceptions, which make our applications crash in most unexpected ways. So I have taken a challenge - can you use object-oriented language (C#) and write code in a way that those issues are almost gone? I will show how to leverage lessons learned from functional programming to make our applications more bulletproof - and fun to write as well!
Designing function families and bundles with java's behaviors parameterisatio...Alain Lompo
User requirements are sinking sands: should we care or should we leave it to the business managers? Java’8 behaviours parameterization and lambdas help shift paradigms from business to design: here the audience will learn how to efficiently deal with the issue and make their customers smile.
Introduction to programming by MUFIX Commnitymazenet
Introduction to programming by MUFIX Commnity
keywords:programming, java, c++, INTRODUCRTION, MUFIX Community
Disclaimer:All included resources are copyrighted to their owners
Introduction to functional languages and F# for developers. Used for the presentation of the same name to the Vermont Code Camp 2 at the University of Vermont on Sept. 11, 2010 at 12:30 PM.
In this presentation following topics have been told.
1. What are translators?
2. Different types of translators.
3. working of compiler and interpreter.
4. phases of compiler.
"Code Generation in Perl" presented to Silicon Valley Perl in Santa Clara CA by Ian Kluft on September 7, 2017. The presentation surveys the landscape of code generation tools and techniques including preprocessers, compliers and model languages, as well as CPAN modules to help with those tasks. Code generation has always been useful for automation of tedious tasks. There is also some debunking of myths from science fiction about what is currently possible with code generation. No matter how much processing is involved, at some level someone still has to write the programs.
This presentation explores the benefits of functional programming, especially with respect to reliability. It presents a sample of types that allow many program invariants to be enforced by compilers. We also discuss the industrial adoption of functional programming, and conclude with a live coding demo in Scala.
Functional Programming for OO Programmers (part 1)Calvin Cheng
The Why and Benefits of Functional Programming paradigm. Part 2 with source code can be found here: http://www.slideshare.net/calvinchengx/functional-programming-for-oo-programmers-part-2
Related source code https://github.com/calvinchengx/learnhaskell
This is my very first seminar presentation. It was presented at an event organized by Adama Science And Technology University Computer Science And Engineering Club. Here I discuss the basic concepts in the world of functional programming.
Domain Modeling & Full-Stack Web Development F#Kevin Avignon
In this case study, we will look at how F# helps tackle the complexity; its type system allows for a clean and intuitive representation of the domain, while keeping us from introducing all sorts of accidental bugs.
In the modern web applications, the issues are many. Developers must be expert of different stacks to be able impact the software. One of those issues is to be able to move from the back-end to the front-end using different languages which involves a lot of context switching and potentially duplicating code such as for validation, or introducing bugs by manually creating objects in a Javascript and sending them back to the server for it to handle. SAFE brings many technologies together into a single type-safe and flexible F# stack. It enables skill reuse since the models can be shared and all you’re required to know is F# for your next web application.
In this session you will learn about
- Introduction of Languages
- Difference between POP and OOP
- What is OOP?
- Object-Oriented Programming
- Advantages of OOP
- Object-Oriented Programming Paradigm
- Features of OOP
- Applications of Object Oriented Programming
- Benefits of Object Oriented Programming
Porting the NetBeans Java 8 Enhanced For Loop Lambda Expression Refactoring t...Raffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. However, the Eclipse IDE is missing several key refactorings that could help developers take advantage of new features in Java 8 more easily. In this paper, we discuss our ongoing work in porting the enhanced for loop to lambda expression refactoring from the NetBeans IDE to Eclipse. We also discuss future plans for new Java 8 refactorings not found in any current IDE.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. Objective
The popularity of functional programming has been increasing lately.
Specially pure functional languages like F#, Haskell, Scala, Erlang and Elixir are becoming more
popular.
Even OOP languages like C# and Java have included some functional libraries
Ex: LINQ and lambda functions
This session will focus on what Functional Programming is, how it is implemented and why it has
become popular.
3. Content
Programming Paradigms
Imperative vs. Declarative Programming
Functional Programming
Benefits of Functional Programming
Main Concepts
◦ Pure functions
◦ Immutability
◦ Higher Order Functions
◦ Referential Transparency
Implementing functional programming with C#
Multi-paradigm approach
Popularity of Functional Programming
5. Imperative Programming
Focus on 'How' something needs to be done
Explicitly declares sequence of steps to be followed that changes the state
Types
◦ Procedural
◦ Object Oriented Programming
7. Declarative Programming
Focuses on 'What' the result should be
Expresses the logic of the program without explicitly declaring the steps
Types
◦ Functional Programming
◦ Logic Programming
◦ Database approach
11. What is
Functional
Programming?
"In computer science, functional programming is a
programming paradigm—a style of building the structure
and elements of computer programs—that treats
computation as the evaluation of mathematical functions
and avoids changing-state and mutable data."
-Wikipedia
13. First Class
Values
Treat functions as values
Pass functions as data
• Be refered from constants and variables
• Be passed as a parameter to another function
• Be returned as a result from another function
Functions as First-Class Entities can:
18. Pure Functions
A pure function:
◦ Returns the same result if given the same
arguments
◦ Causes no observable side effects
19. Returning same result for same arguments
The value of the variable on the
global context has changed
20. Ex: Functions that read
files or generate
random numbers can
never be pure
21. No Side Effects
Side Effect :
◦ An interaction with an external mutable state apart from the function's input and output
A side effect can be :
◦ Mutation of a global scope
◦ Mutation of the input arguments of a function
◦ Throwing exceptions
◦ Performing any I/O operation
22.
23.
24. Function Honesty
A concept similar to pure functions
The function is an 'honest' representation of its method signature
The behavior can be predicted using the signature.
25. Recursion
Recursion is when a function
calls itself repeatedly.
Used to remove local side
effects
Specially in loops and similar
iterative structures
26. Example: Sum of integers from 1 -10
Non-recursive method Recursive method
Interacts with external
variable result.
27. Referential
Transparency
Being able to replace a
function with its result.
Supported by Pure Functions
and Immutable Variables
◦ Pure functions give the
same result for the same
arguments
33. Functional Programming with C#
C# mainly uses an imperative programming approach
(It's basically an OOP language)
But it also has some declarative approaches
Ex: LINQ library, lambda functions
34. FP Vs. OOP
Functional Programming OOP
Use Immutable data Use Mutable data
Declarative programming Imperative programming
Support parallel programming Less suitable for parallel programming
No side-effects Can produce side-effects
Flow control using function calls and recursion Flow control using loops and conditional statements
Iterate collection data using recursion Iterate collection data using loop
Execution order of statements is less important Execution order of statements is important
36. LINQ
LINQ is a functional library
Follows declarative approach for common operations on
sequences (list)
Ex: Map
Filter
Sort
37. LINQ -Map
Getting a new sequence from a given sequence where the elements of the new sequence have
been obtained by subjecting to a function
Example:
38. LINQ - Filter
Getting a new sequence from an old sequence where the elements of the new sequence are
those that pass a certain condition (predicate)
Example:
39. LINQ - Sort
Getting a new sequence by ordering the old sequence according to the key provided in a key
selector function.
Example:
40. Method chaining
Method chaining is a way of calling a method directly onto the result of a previous method.
We do this all the time with LINQ.
It is a functional approach because it avoids temporary variables and state changes.
41. Fluent Interfaces
Fluent interfaces are an implementation of method chaining.
It is a more complex version of the simple method chaining.
The main feature of fluent interfaces over method chaining is that it is self referencing.
Not all implementations of method chaining will be a fluent interface
The Where and OrderBy functions act on the same instance
of the IEnumerable returned from the Select function.
42. Function Honesty
An honest function is a function that does exactly what it says in the function signature.
No unexpected outputs or inputs.
The exception is not an
output predicted by the
function signature.
Then this is a dishonest
function
43. This method signature says that this function will definitely return an integer.
But actually the truth is this function might return an integer.
It can also throw an exception.
44. Functional Error Handling
Imperative approach
◦ throw/try/catch -> Side effects
Declarative approach
◦ Treat the error as part of the payload
Approaches:
◦ Implementation of Option or Either types
45. Is C# a pure functional
language?
The answer is both YES and NO.
NO because C# is mainly a OOP language and follows
imperative style
YES because C# has some support for functional
concepts like with LINQ
C# is a Multi-Paradigm language
46. Multi-Paradigm Approach
Actually the multi-paradigm approach is a lot more practical when considering
large programs rather than the pure functional approach. It's very difficult to
apply functional approaches to an entire program
Ex: I/O operations are considered side effects that need to be avoided in FP. But
in a real world application it is impossible to not have I/O operations at all.
So, the solution is to isolate the I/O operations to be performed imperatively and
have everything else follow a functional approach
47. INPUT OPERATION
SOME OTHER
OPERATIONS OUTPUT OPERATION
Do this
functionally. There
can be no side
effect causing
functions here
These should be
isolated. You can
use an imperative
approach here
Example:
49. Problems with pure functional programming
LEARNING CURVE DIFFICULT TO WRITE COMPLETE
PROGRAMS IMPLEMENTING
ONLY FUNCTIONAL
PROGRAMMING
HIGH MEMORY CONSUMPTION NEED TO WRITE EXTRA CODE
50. Why is FP
trending right
now?
Pure functional languages like F#, Haskell, Erlang and Elixir are
becoming more popular recently.
This is mainly because of the greater support for concurrency and
parallel processing.
A lot of other traditionally non-functional languages and
frameworks have also introduced different functional utility
libraries to support functional programming.
Ex: RxJs, lazy.js, immutable.js and rambda
51. Success Stories
WhatsApp supports 900 million users with only 50 Engineers using
Erlang
Discord handles over a million requests per minute using Elixir
Facebook's anti-spam system uses Haskell
For each system the most important aspects were concurrency and speed.
They were able to achieve it using functional programming
52. Recap
There are 2 main programming paradigms, Imperative and Declarative
Functional programming is a declarative approach that avoids state changes and mutable data
The main concepts are Pure functions, recursion, higher order functions, immutability and
referential transparency.
C# is a multi-paradigm language that has support for functional programming approaches.
Ex: LINQ library
The main problem with Functional Programming is that it is difficult to implement to a whole
program.
But it is more popular now because of greater support and suitability for parallel processing