RSSAmplifier

Blog

Yehonathan Sharvit

Developer. Author. Speaker.

/RSS feed ↗10 posts

Latest posts

A Wheel, the Same Forwards and Backwards

Aboulafia's Tserouf · Part 4 of 4 ← Previous: Too big to draw, but yet drawable

Too big to draw, but yet drawable

Aboulafia's Tserouf · Part 3 of 4 ← Previous: An elegant formulation, inspired by Bill Gates · Next: A wheel, the same forwards and backwards →

An elegant formulation inspired by the one and only paper Bill Gates ever wrote

Aboulafia's Tserouf · Part 2 of 4 ← Previous: An algorithm ignored for 700 years · Next: Too big to draw, but yet drawable →

A 13th-Century Enumeration Algorithm, Ignored for 700 Years

Aboulafia's Tserouf · Part 1 of 4 Next: An elegant formulation, inspired by Bill Gates →

Separate data schema from data representation

With data separated from code and represented with generic and immutable data structures, now comes the question of how do we express the shape of the data? In DOP, the expected shape is expressed as a data schema that is kept separated from the data itself. The main benefit of Principle #4 is that it allows developers to decide which pieces of data should have a schema and which pieces of data…

Data is immutable

With data separated from code and represented with generic data structures, how are changes to the data managed? DOP is very strict on this question. Mutation of data is not allowed! In DOP, changes to data are accomplished by creating new versions of the data. The reference to a variable may be changed so that it refers to a new version of the data, but the value of the data itself must never…

Represent data with generic data structures

When adhering to Principle #1 of DOP, code is separated from data. DOP is not opinionated about the programming constructs to use for organizing the code, but it has a lot to say about how the data should be represented. This is the theme of Principle #2.

Separate code from data

The first principle of Data-Oriented Programming (DOP) is a design principle that recommends a clear separation between code (behavior) and data. This may appear to be a FP principle, but in fact, one can adhere to it or break it either in FP or in OOP:

Principles of Data-Oriented Programming

This article is an excerpt from my book about Data-Oriented Programming. More excerpts are available on my blog.

Reading the present moment

This is an experiment I am doing about introducing a bit of self-referential stuff in Chapter 13 of "Data-Oriented Programming.