Skip to content

Introduction to Code

Lukas Obermann edited this page Sep 10, 2019 · 1 revision

WIP

This document is dedicated to all of you who are not familiar with the codebase yet.

Functional Programming

If you are familiar with functional programming techniques, you can probably skip this, but if you are not, then the following paragraphs will be essential to understand why the code is written the way it is. Note, that this is still not a complete guide to functional programming and maybe some will disagree with what I say, but coming from an OOP background I think this is a good way to explain FP.

Functional programming is about – functions! Insert GIF of screaming person here. I guess, that was to expect, but functional programming is not only about functions. It's also about »dumb state«. But what is all of this actually about?

In OOP, you have classes. You don't have classes in functional programming. As I use the React library for the view, we don't fully reject classes, because they are necessary for local state and lifecycle events. But in every other context are no classes. There are just functions and state. The state does not know how to change itself, but functions do. And so you apply functions to the state.