Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Functional Programming Architecture

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?

like image 897
Mark Cidade Avatar asked Sep 18 '08 01:09

Mark Cidade


People also ask

What is functional architecture concept?

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.

What are functional programming techniques?

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.

What is a functional diagram in architecture?

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.

What are the three functions for functional programming?

These three functions, which provide a functional programming style within the object-oriented python language, are the map(), filter(), and reduce() functions.


1 Answers

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.

like image 167
Apocalisp Avatar answered Sep 29 '22 15:09

Apocalisp