Java Cup
Inside Java

News and views from members of the Java team at Oracle

Why Update Data-Oriented Programming to Version 1.1?

We just concluded a six-part and seven-thousand-word article series on version 1.1 of data-oriented programming in Java, which went deep into the paradigm as well as the language features that are best used to implement it. It left one question unanswered, though: Why did we need an update to 1.1? In what way does it hope to improve the original proposal? And as a follow up to that: What are the shortcomings of 1.1 and what could a version 1.2 do better? I'll share my thoughts on that in this bonus article. 😃

Version 1.0

Brian Goetz laid out these four guiding principles in his seminal article Data-Oriented Programming in Java:

After implementing a few (small) projects following these guidelines and communicating them in various talks and videos, I started to see room for improvements. Less with the guidelines themselves and more with the way they're formulated:

As you can see, I didn't (and don't) have any issues with the building blocks of data-oriented programming. I just felt that their organization into four principles and their headers could be improved.

Version 1.1

To remedy the issues described above, I made the following changes:

This leads to:

Version 1.2?

But I'm still not entirely happy with the result:

There may well be more issues with the new version, in which case I'm sure that further experimentation with or exposure to data-oriented programming will flush them out. If there's anything you think could be improved, please reach out to me - I'm nipafx everywhere.

Article Series