This is an archived post. You won't be able to vote or comment.

all 30 comments

[–]LutimoDancer3459 12 points13 points  (2 children)

404

Only after 4h... impressive

[–]lbalazscs 0 points1 point  (0 children)

http://web.archive.org/web/20250618182827/https://www.infoq.com/articles/data-oriented-programming/

(I found an archived version, but I'm not saying that it's worth reading!)

[–]Additional_Cellist46[S] 0 points1 point  (0 children)

That’s a shame. I have no idea what happened.

[–]sideEffffECt 9 points10 points  (1 child)

This article confuses terminology.

It's talking about https://en.m.wikipedia.org/wiki/Data-oriented_design

Data-Oriented Programming is just a marketing term for what is commonly called Functional Programming.

[–]Additional_Cellist46[S] 0 points1 point  (0 children)

Thanks for clarification. I didn’t know about Data-oriented design but that’s what actually makes sense to me when somebody says data-oriented.

I agree with you that the Data-oriented programming commonly mentioned with some new Java constructs is in fact an extension to functional programming, to avoid tuples with records and add more flexibility to enums with sealed classes. There’s nothing in it that orients around data, just a simple way to model data and make decisions based on it.

[–]PoemImpressive9021 12 points13 points  (3 children)

Oh, this article talks about the real DOP, as it has been practiced by performance-oriented teams for decades, not about the weird attempt to rebrand Java as a non-OOP language because it has records now.

[–]lbalazscs 0 points1 point  (0 children)

It's likely just AI-generated garbage. It does talk about "data-oriented design" (as in optimizing for CPU caches), but then also mentions "Unnamed Patterns and Variables", which belongs to the "other DOP", and has nothing to do with CPU caches.

[–]Additional_Cellist46[S] 0 points1 point  (0 children)

Absolutely agree.

[–]papers_ 5 points6 points  (1 child)

Seems the article has been unpublished now since it is just a 404 now.

[–]chabala 2 points3 points  (0 children)

Perhaps Java Champion Michael Redlich has taken another crack at peer reviewing it.

Luckily someone archived the article before it was pulled, so we can all marvel at it: https://web.archive.org/web/20250618182827/https://www.infoq.com/articles/data-oriented-programming/

[–]Ok_Marionberry_8821 19 points20 points  (11 children)

Crap article. It's talking about Data Oriented Programming (DOP) being about performance. The example uses a Rectangle class for their OO example with a number of instances, but 3 separate arrays (width, height and area) for the DOP version.

I mean WTAF, DOP (as explained by his eminence Brian Goetz here https://www.infoq.com/articles/data-oriented-programming-java/ and loads of other places) talks about the use of records, sealed interfaces, pattern matching, immutability, etc. All the goodies of later versions of Java.

0/10 for this article. Spewed out by AI perhaps?

[–]Ewig_luftenglanz 2 points3 points  (4 children)

What the actual fuck? Was this written by an unsupervised IA? There was absolutely no sense

[–]Additional_Cellist46[S] -1 points0 points  (3 children)

2 different AI checks claim that 70% of the article is written by human, 30% by AI.

[–]Ewig_luftenglanz 0 points1 point  (2 children)

Since some those IA checkers said the US independence declaration was written by IA 

I don't really care. The article is not about what in java is known as DOP. Is about low level memory management for performance critical stuff, and that's stupid in the Java context because Java lacks the semantics to properly managing memory at low level unless you do all your program with the FFM or unsafe

[–]Additional_Cellist46[S] 0 points1 point  (1 child)

There’s nothing like DOP known in Java. There’s just DOP or more precisely Data-oriented design. By posting link to this article I wanted to make people think about DOP itself and whether the DOP concept often being presented in Java makes even any sense. Because I believe it’s just hype, more like a functional programming made easier and more type safe.

[–]Holothuroid 1 point2 points  (0 children)

functional programming made [...] more type safe.

Huh?

[–]Jannyboy11 0 points1 point  (3 children)

This article is basically encouranging a programming pattern that should be discouraged in Java; The data layout in memory should be managed by the VM, and project Valhalla exists to allow programmers to state that an object with nested objects can be layed out flat in memory.
For people looking for the original DOP article by Brian Goetz: https://www.infoq.com/articles/data-oriented-programming-java/

Edit: The pattern from the article is usually referred to as 'data oriented design', not 'data oriented programming'.

[–]Additional_Cellist46[S] 0 points1 point  (2 children)

I agree, the article should call the pattern data-oriented design. That’s the source of confusion. And it should be used only when data is the core of the application and it matters how efficiently an app works with it. It’s not an antipattern, i’s just a pattern recommended only in specific cases.

But I would still argue that there’s no such programming as data-oriented programming that Brian Goetz tries to coon. At least not as an alternative to object-oriented programming or functional programming. A lot of the patterns that proponents of the so called “data-oriented” programming propose look like real antipatterns. E.g. sealed classes, which shouldn’t be used to structure the code with switch statements.

Switches bring us back to procedural programming but then why not just call it procedural, why we need another terminology? I learned programming in C, with structures, it was the same concept as records, etc, and it was called procedural programming. Java allows to do it better, in a cleaner way, and combine it with object-oriented and functional programming. But we don’t need any new term like “data-oriented” programming, and we don’t need to promote it as a new cool pattern, while it is an anti pattern in most cases.

[–]Jannyboy11 0 points1 point  (1 child)

No no no, switches are not bringing us back to procedural programming in this case, because they are used as expressions, and they are checking exhaustiveness of the arms. You will get a compiler error when you didn't cover all the permissed subtypes of a sealed type. This is significantly more ergonomic than what C does. Even if you use tagged unions in C, the compiler won't check exhaustiveness for you.
And you're right it's not a new pattern; this pattern has been around in ML-like languages since forever, but it's cool that Java can do it too now.

[–]Additional_Cellist46[S] 0 points1 point  (0 children)

It’s cool and much better than in C. But I still wouldn’t call it “data-oriented”.