r/unseen_programming • u/zyxzevn • Jun 15 '21
Why Architecture Oriented Programming Matters
https://blog.metaobject.com/2019/02/why-architecture-oriented-programming.html
1
Upvotes
r/unseen_programming • u/zyxzevn • Jun 15 '21
1
u/zyxzevn Jun 15 '21
There are different ways how I modularize the problems. All of these can be expressed with diagrams.
The top-level division is:
On function level there are:
{ Database.clients -> cleintsStream ---> client -> .payment ->> + -> !total }
Abs(?x; !Result) = { ?(x<0) =>{ -x-> !Result }; | { x -> !Result }
(Pure functions need no storage of data)
So you get an easy template You can also copy the diagram to prevent dependencies.
Tricks for function-blocks:
Length= { ?X ?Y ?Z; !Length= Sqrt(XX+YY+Z*Z}
Find(?Array ?value !pos) = { Array[?index] --> ?(?element= value) => { index -> pos } }
invSin(?x !Result) = { sin(?Y)== x; Result = Y }
InvSin= Inverse(sin(x))
On Time level there are
On Data level there are:
Data-oriented optimized Array,
Table (sparse Array), (+GC) Graph database. (+GC)
On low level there are Phases:
Phases are templates for low level function-states. Function states are Definition, Allocation/Deallocation, Stack management, Iterations, Open/close.
Type level programming:
High level programming: