Computing is still primitive and Fragile.
For example, Typography is an ancient profession.
CSS3 is just cute, compared to what Typographers can do.
It is haughty to think that computers can do everything, with fidelity.
Donald Knuth spent a disproportionate amount of time on typesetting,
and rightfully so.
To put Entity Systems in context, here is a list of programming
paradigms as used in the Software Industry.
Automata Programming
Automata/ State Machines are at the heart of all Software.
- Parsers
- Validation Mechanisms
- Protocols
- Circuit Design
- Industrial Robots
Currently state machines can be implemented by the following
techniques,
-
This is the OO way of doing it.
-
This uses function pointers.
Goto’s
I find it appalling that gotos are considered a joke.
Here is a Knuth’s defence of goto. The paper also has a hint of satire,
on how programming language designers are complicit in advocating Newspeak,
for “safety”.Just for a perspective, see the tcp/ipv4 code from FreeBSD.
This code is used by Sony and many embedded systems.
The Linux implementation is similiar.
The most critical piece of Internet Infrastructure is designed as a state machine using goto's.
Using goto’s is hardly different from Dispatch Tables.
RAM is a hardware implementation of a table.
Why is there, no joke on this page ?
Probably because it’s used in the Electronics Industry.
Blaming goto’s is like blaming a Scalpel.
Structured Programming
This has the following styles,
Procedural Programming
See Program Development by Stepwise Refinement
Typically how you write C programs.Objective Programming
Encapsulation for me, is the most important idea here.
Modular Programming
>>> import this ... Namespaces are one honking great idea -- let's do more of those!
Functional Programming
Functional programming structures code around transformations,
than state changes.It’s tricky to do Games in Pure Functional Programming.
Impure Functional Programming as seen in Common Lisp, Clojure,
Perl, Python, Ruby, OCaml is more successful.
Declarative Programming
The following are some fine examples,
HTML, make
SQL, Logic Programming
DSL’s and Scripting Components.
See Rake, Blender API
Generative Programming
This includes Lispy Macros, yacc.
Event Driven Programming
Computers react to events.
Data Flow Programming
This is my favorite paradigm.
Impure Functional programming fits nicely here.
Unix Pipes
Nuff said.
Max/Pure Data
Spreadsheets
Most widely used Programming Language if you ask me.
Visual Programming
A bit of a stretch, but anything from Photoshop layers to Circuit Design goes here.
Parallel Programming
Erlang is a great success story.
What is wrong with objects ?
I would argue that the chief problem is performance.
In a way Entity Systems, takes concepts from every one of the above.
I am not even sure it’s a new Paradigm.
But the reason I am excited about Entity Systems is, it puts us right back
into Batch Computing. Entities are stored centrally and Systems perform batch operations on them.
And best of all, it is battle tested by Game Developers.
For the past ~10 years or so the Game Programming community has adopted
Data Driven Programming with Homogeneous Data quite successfully.
In contrast to Data Flow and Message Passing, Data Driven Programming
as adopted by Game Programmers resembles Shared Memory style of Process Communication and the Black Board pattern.
There is also a programming language called Linda that does this pattern natively.
http://entity-systems.wikidot.com/
http://www.dataorienteddesign.com/dodmain/dodmain.html