All Questions
Tagged with functional-programming object-oriented-design
19 questions
0
votes
2
answers
376
views
C# coding style, functional approach
I have thought of this for a while and I want to know what you think about this.
This is more of a way to structure the code that might not be 100% object oriented and that is not the purpose. I would ...
1
vote
2
answers
249
views
Connecting classes by passing method references
I am trying to find a good way of allowing two objects that are separated by a intermediate object to communicate while keeping the architecture loosely coupled. A solution I have developed is to pass ...
79
votes
10
answers
17k
views
How functional programming achieves "No runtime exceptions"
How does a functional programming language, such as Elm, achieve "No runtime exceptions"?
Coming from an OOP background, runtime exceptions have been part of whatever framework that is based ...
5
votes
5
answers
597
views
Implicit reading/writing of state in OOP hurts readability, maintainability, and testability. Good way of mitigating this damage?
OOP makes state reads and writes implicit. For instance, in Python:
class Foo:
def bar(self):
# This method may read and/or write any number of self.attributes.
# There is no way ...
1
vote
1
answer
198
views
Representing mathematical tree structures using software in a compact manner
In my work I frequently come across systems of interdependent equations. I have contrived a toy example as follows. The terminal values w, x, y and z are given:
e(y) = A+B
A(y) = x*log(y)+y^z
B(y) =...
2
votes
1
answer
885
views
What is the correct granularity for events in the context of designing a rule-based decision system?
Introduction
We need to design a system that, given a set of events that are happening in the source application, reacts to them and if some conditions have been met, actions can be triggered. Users ...
1
vote
2
answers
293
views
Comparing approaches of mapping data objects
Update: I added some diagrams to help understanding
I had a discussion with a colleague about two different approaches in mapping data objects. I'd like to get your opinion on pros and cons between ...
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 ...
-7
votes
1
answer
132
views
In internal computer memory Char value ,string and integer how they differentiate time of storing and retrieving
In internal computer memory Char value ,string and integer how they differentiate time of storing and retrieving .
Char A =ASCI value 127
Int value 127
Binary is same then how computer understand ...
18
votes
6
answers
3k
views
Does functional programming increase the 'representational gap' between problems and solutions? [closed]
Since machine language (e.g., 0110101000110101) computer languages have generally evolved to higher forms of abstraction, generally making it easier to understand the code when it's applied to a ...
3
votes
0
answers
353
views
Lightweight data modeling vs traditional classes [closed]
I've heard a lot of talk about using lightweight data modeling as of late. Especially in relation to the Clojure programming language. What is it and how it differs from traditional classes regarding ...
11
votes
4
answers
3k
views
Why not apply Interface Segregation Principle to "extreme"
Providing that clients would typically consume just one method, though methods would be conceptually related, why not always apply the Interface Segregation Principle to the extreme and have [many] ...
6
votes
3
answers
2k
views
Functional programming strategies in imperative languages
I've been convinced for awhile now that some strategies in functional programming are better suited to a number of computations (i.e immutability of data structures). However, due to the popularity of ...
27
votes
7
answers
4k
views
Does functional programming ignore the benefits gained from the "On the Criteria To Be Used in Decomposing Systems into Modules" (data hiding)?
There's a classic article named On the Criteria To Be Used in Decomposing Systems into Modules that I just read for the first time. It makes perfect sense to me, and is probably one of those articles ...
3
votes
2
answers
2k
views
design a model for a system of dependent variables
I'm dealing with a modeling system (financial) that has dozens of variables. Some of the variables are independent, and function as inputs to the system; most of them are calculated from other ...