Understand the Unit programming paradigm
mainUnit is a paradigm based on Flow-based Programming where software systems are viewed as compositions of input and output (IO) machines. Unlike traditional textual programming where a function takes an ordered list of arguments and returns a single datum, a unit can receive and send data at any time, in any order, through multiple inputs and outputs.
Key concepts include:
- Composition: Building new units by piping and collapsing smaller units together.
- Decomposition: Breaking down a graph into its constituent smaller units.
- Directed Graphs: Code in Unit is represented as a directed graph, merging software architecture with actual development.
- Unified UI and Logic: User interface components are themselves units, meaning they can be composed, decomposed, and inspected alongside the logical circuitry that controls them.
- No Frontend/Backend Divide: There is no explicit separation between client and server logic. All processes can contain components and communicate through standard channels. APIs like
HTTP,File System, andDatabaseare universally available, allowing programs to run seamlessly across different hosts.