News for hackers. Stuff that matters.
Re:Ask HN: Data-Oriented programming vs. Functional programming by mamcx on Friday March 12, 2021 @09:53AM (#26436411)
No.

The specific structure can be part, but the difference is exactly as is on the name.

Niklaus Wirth say:

   Algorithms + Data Structures = Programs
Most paradigms pay a bigger attention to the "Algorithms" side. And data is a distant second class citizen.

"Functional Programming" is about functions. All discussions are centerer in the algorithms related to it.

"Object oriented" is about objects. All discussions are centerer in the algorithms related to it.

But this is distracting:

    Show me your flowcharts, and conceal your tables, and I shall continue to be mystified; show me your tables and I won’t usually need your flowcharts: they’ll be obvious.
Fred Brooks

That is why a lot of people get drown in abstractions, instead of solve what the problem is.

---

Now, if we instead make data the driver of the decisions a lot of things can be simplified. A common example is when we ditch "abstracting-away" ORMs and just use SQL (that is data oriented), because hide/not use at full what a RDBMS is moronic.

----

But both are part of the same coin. So if data become truly important, WHICH algorithms fit it better?

This is where become easier to work on data with structural comparisons, immutability, etc. Is in fact a relational way of think, just with other names and probably a small part of it.

---

Now the answer is more like "yes" because focus in how represent data is actually big part of the deal, but that still can make some to get carry away by the algorithms of it, like get too focused in make use of persistent structures instead of exactly think on HOW to represent the data that allow the best way to manipulate it.

Re:Ask HN: Data-Oriented programming vs. Functional programming by viebel on Friday March 12, 2021 @10:02AM (#26436504)
Has this data-centric approach be embraced in programming languages other than Clojure?
Re:Ask HN: Data-Oriented programming vs. Functional programming by threatofrain on Friday March 12, 2021 @11:13AM (#26437299)
How is Clojure data centric in the way people are talking about here? IMO Clojure values immutability in a way which is data agnostic, not data aware.

Also Clojure not emphasizing the power of types… but types emphasize programming with data awareness.

Re:Ask HN: Data-Oriented programming vs. Functional programming by fulafel on Saturday March 13, 2021 @07:12AM (#26446059)
In the Clojure culture it tends to be seen as virtuous and desiereable when instead of writing out logic that implements rules or state tracking, you work with the rules and state as plain data in nested data structures of maps, vectors, sets, keywords used as symbols, etc.

Things like http routing, schemas of data (malli / spec), having an in-memory "app-db" storing all state for a CloureScript web frontend, etc. You can then employ universal and powerful data traversal/validation/manipulation tools in Clojure to these data structures.

Re:Ask HN: Data-Oriented programming vs. Functional programming by mamcx on Friday March 12, 2021 @03:32PM (#26440541)
Dependes in how you think about this, SQL is the most prominent.

Also array Langs like kdb+?