Skip to main content

All Questions

10 votes
4 answers
1k views

Functional architecture with lots of I/O

I'm learning about "Functional Core, Imperative Shell" as espoused by Gary Bernhardt in his talk about "Boundaries". In reality, it seems like these ideas have been known for a ...
Maletor's user avatar
  • 209
0 votes
1 answer
113 views

Is duplicating, deleting, pushing, and/or an object to/between lists a code smell?

I'm thinking about a structure like this. cardGame: players: - john: hand: - card: id: 1 suit: diamond ...
Nina Reynolds's user avatar
3 votes
2 answers
723 views

In which programming paradigm can't code reuse be (easily) achieved?

In a video about software architecture that I'm watching, it's stated that the main program/subroutine architectural style promotes modularity and function reuse Code reuse is one of the main ...
antonro's user avatar
  • 249
50 votes
9 answers
14k views

Return considered harmful? Can code be functional without it?

OK, so the title is a little clickbaity but seriously I've been on a tell, don't ask (TDA) kick for a while. I like how it encourages methods to be used as messages in true object-oriented fashion. ...
candied_orange's user avatar
3 votes
1 answer
410 views

Dependencies between functions-only modules: hardcoding vs alternatives

In switching from a procedural background to "FP in the small, OO in the large" I'm grappling with the following problem. Suppose there're modules, each only containing numerical math functions ...
schrödingcöder's user avatar
1 vote
1 answer
117 views

Simplified API one case class vs robust and multi ADT case class? [duplicate]

Below are oversimplified examples, but I wonder which route to take what is the best practice when designing API, the simple or the more complex and robust which is better? This looks good and goes ...
Jas's user avatar
  • 507
24 votes
4 answers
12k views

Should functions that take functions as parameters, also take parameters to those functions as parameters?

I often find myself writing functions that look like this because they allow me to easily mock data access, and still provide a signature that accepts parameters to determine what data to access. ...
NightWatchman's user avatar
6 votes
1 answer
611 views

Functional core for elevator system design

How can Gary Bernhardt's "Functional Core / Imperative Shell" architecture be used to design software for an elevator system? Specifically, let's say there are a few elevators, each with call buttons ...
max's user avatar
  • 1,115
16 votes
4 answers
3k views

APIs and functional programming

From my (admittedly limited) exposure to functional programming languages, such as Clojure, it seems that encapsulation of data has a less important role. Usually various native types such as maps or ...
jameslk's user avatar
  • 279
3 votes
2 answers
250 views

Dealing with states in a immutable approach [closed]

I want to know how to deal when you have some states in a program, with functions that depends on them, but with a immutable approach. I read some examples and questions, but all focus in a small ...
Wagner's user avatar
  • 133
-1 votes
1 answer
142 views

New DDD, context-oriented, functional... approach in building business layer [closed]

We are building some business modules that must be intuitive for developers to use, so the code itself explains and forces developers to use it in certain way. This applies both for enhancing the ...
lawpert's user avatar
  • 836
7 votes
2 answers
1k views

Is the application architecture of Facebook Flux a new idea?

Facebook announced that it's using the architecture they call Flux to develop their projects. It consists of a single direction dataflow, and concepts like a Dispatcher, Stores and Actions (well ...
Lucas Reis's user avatar
23 votes
4 answers
4k views

How does persistence fit into a purely functional language?

How does the pattern of using command handlers to deal with persistence fit into a purely functional language, where we want to make IO-related code as thin as possible? When implementing Domain-...
7 votes
1 answer
2k views

How can we calculate Big-O complexity in Functional & Reactive Programming

I started learning functional programming, I am trying to compare between different algorithms that are written in an imperative, functional , parallel programming and using Collections and Lambda ...
user3047512's user avatar
71 votes
12 answers
9k views

"Everything is a Map", am I doing this right?

I watched Stuart Sierra's talk "Thinking In Data" and took one of the ideas from it as a design principle in this game I'm making. The difference is he's working in Clojure and I'm working in ...
Daniel Kaplan's user avatar

15 30 50 per page