CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 23:19:26 GMT
content-type: text/html; charset=utf-8
cf-ray: 967894b20bf0755c-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=bacbf179-c34c-4947-a49c-6999cd9a859b; expires=Thu, 30 Jul 2026 23:19:25 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: eb78e0c3-59a7-4ead-9873-e3b2ca898210
x-worker-origin-response-time: 420000000
x-dns-prefetch-control: off
set-cookie: prov=bacbf179-c34c-4947-a49c-6999cd9a859b; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=6UWjz6WHZtX2gpCQbT1OWQ89rK8qluZJLAGQllvXKAM-1753917566-1.0.1.1-WzZoelnmd.dhj3lpEp23_Bc38n6G1VN_63TzcI52nPsvgl5WG3ufQdI7NHYsrnGhx8ZBWM.HPVqbA1e45rzVvYiQi4nCxQBdnMcpCpNzaS8; path=/; expires=Wed, 30-Jul-25 23:49:26 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=Lq3jjHhOm2CK0iH2IzM4ujQ4lakVmjmwDLbM6BGRC1k-1753917566219-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'functional-programming' Questions - Software Engineering Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more.
View results.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [functional-programming]
Functional programming is a paradigm which attempts to solve computational problems by the chained evaluation of functions whose output is determined by their inputs rather than the programme state. In this style of programming, side effects and mutable data are deprecated and usually strictly isolated.
744 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
6
answers
488
views
Is OOP really beneficial for enterprise-scale business software compared to procedural languages like ABAP or COBOL?
I'm currently drafting a Python coding standard for internal enterprise use, primarily targeting business applications that involve heavy data access, reporting, and transactional logic.
In this ...
4
votes
5
answers
403
views
Anemic Models vs. Rich Models: When to Use?
I'm working on an application and have encountered two different approaches for organizing business logic. There's a general consensus that application rules should be handled in higher layers, so I ...
0
votes
3
answers
242
views
How to filter "locally and remotely" in functional programming
My example applies to reading and deleting files (I/O), but this is probably a common scenario (eg, keeping local and global state in sync in functional programming).
I am reading in files from a ...
3
votes
3
answers
322
views
How to "pass through" data in a functional programming pipeline so that it's accessible later on in the pipeline
I am trying to refactor some JavaScript code to use functional programming principles.
I have some functions that I want to use in a series of maps.
const transformedData = rawData
.map(...
5
votes
3
answers
643
views
Are "pipelines" in functional programming bad for time complexity?
This question is not meant to be a critique of functional programming, but more hoping for resources and opinions.
I am refactoring some historically messy code so that it follows functional ...
4
votes
2
answers
418
views
How to handle file I/O in a for loop?
(this question is written using javascript for examples)
Say I have a bunch of files that I need to access sequentially:
1.json
2.json
3.json
4.json
...
Say I want to transform the data in all of ...
0
votes
1
answer
159
views
(functional programming) What do you call a function that abstracts away a group of function calls?
(this question is written from a functional javascript point of view)
say you have some pure functions:
function a (arg) {
...
return result
}
function b (arg) {
...
return result
}
function ...
2
votes
1
answer
296
views
Did the term "decorator" originate with OOP design patterns?
The Decorator pattern allows behaviour to be dynamically added to an existing object, effectively "decorating" it with new behaviour. While the pattern as formalised and named seems to have ...
1
vote
1
answer
799
views
How could I apply the strategy pattern to a react component? [closed]
For the following component, how would I extract the unit logic to allow for composition? In my actual app I am trying to reduce the amount of logic encoded in the component and I have decided that ...
2
votes
1
answer
135
views
OO vs FP: What is a good approach to understanding if heavy wrapper classes should be used?
Consider a processing system which ingests objects from an external source and performs extensive processing. One example could be objects detected by a computer vision system which are then fed into ...
1
vote
2
answers
338
views
Why did TC39 name JavaScript's array predicate functions `some` and `every` instead of `any` and `all`?
Python, Ruby, Rust, Haskell, Kotlin, C#, C++, Perl, MATLAB, SQL, and R all call their respective array predicate checking functions any and all.
Is there any record of why JavaScript's designers ...
6
votes
2
answers
1k
views
Object immutability and persistence
While I was learning functional programming I have encounterd two for me very similar terms: immutability and persistence. Also I have read simular questions from stackoverflow, but I am still ...
1
vote
3
answers
479
views
Scala Option vs. conditional branches
If I'm writing Scala functions and have to check for nulls in situations where I can't avoid it (say, working with Spark UDFs and some legacy Java types), is it better to turn things into Option or to ...
-1
votes
1
answer
119
views
When is the application of Kotlin infix functions appropriate? [closed]
The Kotlin language brings the simplification of function calls to the natural language. This article shows a nice example:
Function:
fun of(suit: Suit) = Card(this, suit)
val card = Rank.QUEEN.of(...
-1
votes
1
answer
1k
views
Should I use function-based exports/imports or classes?
What would make more sense, to use functions for exports/imports:
// globals/helpers.js
exports.fnOne = () => {}
// features/user.js
const {fnOne} = require()
Or class-based approach with static ...
- The Overflow Blog
-
-
- Upcoming Events
-
2025 Community Moderator Electionends August 13
- Featured on Meta
-
-
-
Related Tags
haskell × 99
object-oriented × 95
javascript × 50
design × 43
c# × 38
scala × 37
design-patterns × 36
java × 36
f# × 32
python × 30
functions × 29
immutability × 29
paradigms × 26
algorithms × 24
pure-function × 23
clojure × 22
monad × 21
data-structures × 20
side-effect × 20
c++ × 18
architecture × 16
more related tags
Hot Network Questions
- VMWare, SAN, SSD, Influence of the fill level on the performance of a virtual hard disk
- Finite projective plane with trivial automorphism group
- Is it commonplace/acceptable for university professors to not teach Evolutionary Biology based on their religious beliefs?
- I applied for a postdoc and the position was left unfilled because no candidate was found to be a good match. Should I follow up?
- What are ways to prevent overly long ballots?
- GraphQL Search Not Working for Multilist Field (Category) in Sitecore JSS
- Can a body part of a defeated monster act as an associated object for the Teleport spell to find a creature's lair?
- Seven-dimensional cross product
- CCZ magic state teleportation
- Area of a Quadrilateral Formed by Intersecting Lines in a Triangle
- Wolf and sheep probability
- Why is my 74HC595 working without VCC?
- What happens if a witness is required to travel to the US to make a deposition but is refused entry?
- Golden-section optimization with complication
- Blakes 7 episode Powerplay. What were the 'hospital staff,' planning to do?
- Integral with multiple variables
- Should I simply accept the terms without reviewing them for legal appropriateness?
- General Two-dimensional Elliptical Gaussian Image Generator in C++
- Hill Estimator for SkewStudentT is Biased
- Rim brakes and drop bar brifters
- Is there a reason "replace conditional with table" isn't a standard refactoring?
- What are these orange and green solid circles painted on a taxiway?
- Are all Universities this internally cut-throat?
- Can I bring mycelium pellets into Greenland?