I'm familiar with object-oriented architecture, including use of design patterns and class diagrams for visualization, and I know of service-oriented architecture with its contracts and protocol bindings, but is there anything characteristic about a software architecture for a system written in a functional programming language?
I know that FP has been used for medium-size to large scale projects. Paul Graham wrote the first incarnation of Yahoo! Store in Common Lisp. Some lisp development systems are complex. Artifical intelligence and financial systems written in functional languages can get pretty big. They all have at least some kind of inherent architecture, though, I'm wondering if they have anything in common?
What does an architecture based on the evaluation of expressions look like? Are FP architectures more composable?
Update: Kyle reminded me that SICP is a good resource for this subject.
Update 2: I found a good post on the subject: How does functional programming affect the structure of your code?
Functionalism, in architecture, the doctrine that the form of a building should be determined by practical considerations such as use, material, and structure, as distinct from the attitude that plan and structure must conform to a preconceived picture in the designer's mind.
Functional programming is a coding strategy that focuses on the direct use of functions as first-class objects. This means that in a functional program, you are allowed to create, store, and call functions, and otherwise use them as if they were just another variable of the system.
A functional flowchart is also a freehand diagram which is drawn after the bubble diagram to generate main functions or spaces in the building, how they connect to each other and circulation routes in the building. This is like a rough sketch of a floor plan.
These three functions, which provide a functional programming style within the object-oriented python language, are the map(), filter(), and reduce() functions.
The common thread in the "architecture" of projects that use functional languages is that they tend to be separated into layers of algebras rather than subsystems in the traditional systems architecture sense.
For great examples of such projects, check out XMonad, Yi, and HappS. If you examine how they are structured, you will find that they comprise layers of monadic structure with some combinator glue in between.
Also look at The Scala Experiment paper which outlines an architecture where a system is composed of components that abstract over their dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With