data-oriented-programming

Spread the word among the global developer community about Data-Oriented programming https://en.wikipedia.org/wiki/Draft:Data-oriented_programming
Yehonathan Sharvit 2021-02-18T21:15:49.020300Z

How would you guys improve the definition of DOP in the article? Currently the definition is:

Yehonathan Sharvit 2021-02-18T21:15:52.020500Z

In https://en.wikipedia.org/wiki/Programmingdata-oriented programming (DOP) is a https://en.wikipedia.org/wiki/Programming_paradigm based on the treatment of https://en.wikipedia.org/wiki/Data_(computing) as a https://en.wikipedia.org/wiki/Value_semantics and the usage of general-purpose code to manipulate data. The main objective of DOP is to reducehttps://en.wikipedia.org/wiki/Draft:Data-oriented_programming#cite_note-1 the accidental https://en.wikipedia.org/wiki/Programming_complexity of a program as it is defined by https://en.wikipedia.org/wiki/Fred_Brooks in his paper https://en.wikipedia.org/wiki/No_Silver_Bullet.

Yehonathan Sharvit 2021-02-18T21:16:42.021Z

Is the definition clear and accurate?

Yehonathan Sharvit 2021-02-18T21:16:46.021300Z

How could we improve it?

caumond 2021-02-18T21:31:31.024200Z

Is it not important to compare it to other paradigms, for instance mentionning the dop claims to separate data and treatment

caumond 2021-02-18T21:32:52.026100Z

I guess it is being the data as a value sentence but Im pretty sure it is not clear enough for people who dont know dop already3

Yehonathan Sharvit 2021-02-18T22:12:10.027200Z

@caumond I don’t understand what you wrote about comparison with other paradigms

2021-02-18T23:31:11.027900Z

I think it's helpful to compare to the code as data philosophy in lisp

2021-02-18T23:31:21.028200Z

Since they're related in interesting ways

Yehonathan Sharvit 2021-02-18T23:32:31.028900Z

Could you elaborate a bit @metasoarous?

2021-02-18T23:34:48.030500Z

Well, to me DOP is somewhat two-pronged: • building code around domain data • using data apis in a higher order way to describe things that need to happen or be computed

2021-02-18T23:34:57.030800Z

For the second of these, I think Vega-Lite is a really great example

2021-02-18T23:35:01.031Z

(Or Vega)

2021-02-18T23:35:20.031400Z

They are data APIs for specifying data visualizations

2021-02-18T23:35:28.031600Z

So... code as data in a way.

2021-02-18T23:36:04.032300Z

But not necessarily code as data in the traditional Lisp way, where it's a thing that happens at compile time via macros (allowing you to extend the language)

2021-02-18T23:36:12.032600Z

Rather, at run time, dynamically

2021-02-18T23:36:51.033200Z

Imagine you wanted to build an analytics tool with some graphical UI for describing computations that need to happen

2021-02-18T23:40:05.034400Z

How would a Clojurist approach building that?

2021-02-18T23:40:15.034800Z

Well, they'd probably build a data API for describing those computations

2021-02-18T23:40:22.035300Z

And then UI that composes those data structures

2021-02-18T23:40:46.035800Z

So that's the "higher order" sort of thing I'm talking about

2021-02-18T23:41:02.036200Z

And again, the relationship to Lisp philosophy is really interesting and important here

Yehonathan Sharvit 2021-02-18T23:41:20.036400Z

It’s very interesting

Yehonathan Sharvit 2021-02-18T23:41:26.036600Z

But…

Yehonathan Sharvit 2021-02-18T23:41:37.036900Z

I don’t think it’s part of Data-oriented programming

2021-02-18T23:41:42.037200Z

Oh; Interesting

Yehonathan Sharvit 2021-02-18T23:42:05.037600Z

I think that it relates to https://en.wikipedia.org/wiki/Declarative_programming

2021-02-18T23:42:22.038100Z

I think that connects though

2021-02-18T23:42:43.038600Z

Because specifying computations as data APIs is fundamentally declarative

2021-02-18T23:43:11.039300Z

Not all declarative APIs are necessary "as data", but I think most (if not all) data APIs are declarative APIs.

Yehonathan Sharvit 2021-02-18T23:43:21.039500Z

I agree

Yehonathan Sharvit 2021-02-18T23:44:40.040900Z

But the way I see it DOP is a guidance of how to represent data and how to manipulate data. Data that comes from the “real” world

Yehonathan Sharvit 2021-02-18T23:44:56.041300Z

Expressing computation logic as data is a different topic

2021-02-18T23:45:27.041800Z

Is it though? Is "computational logic" not part of "the 'real' world"?

2021-02-18T23:45:41.042200Z

I'm trolling a bit

2021-02-18T23:46:04.042700Z

I understand your distinction, but disagree that data-driven (or oriented) programming is limited to one but not the other

Yehonathan Sharvit 2021-02-18T23:47:38.044200Z

I think that expressing computation as data is a subtopic of declarative programming. For instance, SQL is declarative but not data.

Yehonathan Sharvit 2021-02-18T23:48:49.044500Z

I think that Prolog also is declarative but not data

2021-02-18T23:49:31.045400Z

Sure, but there is precedence for the idea of data-driven or oriented programming meaning this specific kind of declarative programming

2021-02-18T23:49:38.045700Z

There are plenty of talks out there about this

2021-02-18T23:49:41.046Z

It's not just me

Yehonathan Sharvit 2021-02-18T23:50:11.046800Z

Are you sure that they call it data-oriented programming

2021-02-18T23:50:17.047200Z

I'm a little biased because my first Clojure book was the Joy of Clojure, which explicitly frames the clojure philosophy this way

2021-02-18T23:50:22.047400Z

Pretty sure

Yehonathan Sharvit 2021-02-18T23:50:29.047600Z

There are lot of similar terms to diffrent things

2021-02-18T23:50:37.048200Z

Sorry have to go; my washer is leaking as it so happens

Yehonathan Sharvit 2021-02-18T23:50:47.048400Z

O

Yehonathan Sharvit 2021-02-18T23:50:48.048600Z

O

Yehonathan Sharvit 2021-02-18T23:50:50.048800Z

Ok

Yehonathan Sharvit 2021-02-18T23:50:54.049Z

We can continue later

Yehonathan Sharvit 2021-02-18T23:51:13.049400Z

There are lot of similar terms to diffrent data related paradigms: