Inherent Logics III.

Published: (January 9, 2026 at 03:18 PM EST)
1 min read
Source: Dev.to

Source: Dev.to

Declarative vs Imperative as Inherent Logics

There’s a design truth I keep coming back to: the form contains its own rule.
The structure itself tells you how it must be used. This isn’t opinion; it’s a consequence.

Simple examples

  • A tree forces you to think in parents/children.
  • A list forces you to think in order.
  • A graph forces you to think in connections.
  • A runtime forces you to think in actions and state.

This is not philosophy—it’s engineering. Every structure carries an inherent logic, a natural way it wants to operate. These are not mere preferences (e.g., tabs vs. spaces); they are the inherent logics of different structures.

We often say declarative code “describes what you want,” but that definition is misleading. Declarative isn’t about describing, narrating, or explaining. It is about defining a structure where the result is implicit in the data, not in the sequence of actions.

In declarative systems:

  • ✅ the data carries the intent
  • ✅ the renderer interprets it
  • ✅ the result emerges from the structure

Example

{ type: "Button", props: { children: "OK" } }
Back to Blog

Related posts

Read more »

U-Groovy

Groovy – A Short Summary of Its Capabilities I have been working with Groovy in Jenkins pipelines for an extended period of time. Now I’m moving more into the...

🚂 Arrays Explained Like You're 5

The Train Imagine a train with numbered compartments: 🚂 Car 0 Car 1 Car 2 Car 3 Car 4 Each car has a number starting from 0! and can hold one thing. Arrays ar...

Story of The First Linked List

🙋‍♂️ Hi In this story, we will uncover how linked lists were first used to solve data‑structure challenges posed by simple arrays of data. Let’s begin. Prologu...