> a = 1 > b = a * 2 > b 2 > a = 2 > b 4
One of the biggest differences in declarative programming oppose to imperative programming is who manages the control flow. In IP, a programmer has full control of instructions that runs through CPU, but in DP, it is based on semantics.
Nucleoid follows formal logic as semantics so that each statement is a part of dependency graph and the runtime builds control flow of related statements accordingly. Since control flow is built just-in-time, additional statements also alter the flow, which lets building behaviors with declarative statements. However, in IP, control flow is written within compile codes, alteration requires complete cycle.
Even though modern databases provide data integrity, logical integrity still has to be part of coding, but programming languages don't provide this such a crucual feature neither. Since the runtime tracks relationships between declarative statements, it is capable of providing logical integrity after each statement.
This model reduces code lines tremendously as well as data flow inside program along with side effects, in addition, prevents programmer nightmares of spaghetti codes, callback hells etc. with simplifying coding structure.
Traditional programming languages don't store object state so that require external data storage, which brings additional complexity to the system. Thanks to declarative programming, by its mechanics, it enables programming runtime to store data at the same time.
Nucleoid can do everything tradition databases do with reducing complexity including advance queries, complex data structures, transactions, data integrity etc. In addition, it keeps state of object in memory so that automaically enables caching also inside the runtime.
Modern systems carry polyglot databases, cache server, log server, security along with programming runtime in different variety, and each element brings own complexity. Nucleoid with declarative programming reduces number of element needed without giving up any feature with simple and clean architecture.
Since declarative programming separates functional intention from its implementation details, scalable model of Nucleoid is not hardcoded at all, which brings simplicity to architecture without losing any ability including still supporting existing scalability models.