Discussion about this post

User's avatar
Reaan Botha's avatar

OOP was never meant for data modeling, despite its superficial similarity to the old network data model. It works well when used to build state machines organized around system responsibilities, as opposed to trying to model a client's business domain. Fact-oriented modeling disciplines build on Codd's relational model of data and is the right perspective for working with data. Entity-component systems implement the same viewpoint: entities are subjects of facts, not containers of attributes.

Paul Tarvydas's avatar

I certainly agree that triples (Datalog, Prolog) and relational programming are incredibly useful.

I use Prolog as part of a pipeline to parse diagrams from graphML to JSON then to Python, JS, CL, Odin, etc.

Given that modern diagram editors are not code editors, one often needs to infer semantic information from diagrams. Thankfully, several diagram editors save out enough information in XML-ish form that can be easily parsed and pruned to reveal interesting relationships.

I wonder if the problem is not exactly "ECS vs. OO", but that there is a missing link?

I see triples and relations as "assembler" for bigger things. Sometimes I want to think in terms of objects, sometimes I want to think in terms of relations. Sometimes I care about production-quality speed, sometimes I just want something that runs "fast enough" to help me develop code.

One size fits all is not good enough today.

We need tools to fill the gap - mapping from OO to triples/relations to allow users to choose whatever notation they deem is appropriate for each given problem.

No posts

Ready for more?