3 ms·
How about trying to define both first? I am not sure what data-oriented means.
by amboo7 6y ago
How about trying to define both first? I am not sure what data-oriented means.
- viebel 6y agoData-oriented programming is about representing data with immutable generic data structures (e.g. maps and lists) and manipulating data with general purpose functions
- hctaw 6y agoThat's no definition of DO I've ever heard. A list is a classic example of a non-data oriented structure! DO as I understand it is about recognizing how data is actually laid out and interacted with by a processor, as opposed to meaningful abstract relationships to a programmer. It's about breaking down costly abstractions, rather than ignoring the cost of higher level abstractions. DO exists primarily in opposition to OO, not FP. The classic example is the array of structs to struct of arrays (OO to DO transformation).
- viebel 6y agoYou are referring to Data-Oriented design, while I am referring to Data-Oriented programming https://blog.klipse.tech/visualization/2021/02/16/data-related-paradigms.html https://blog.klipse.tech/visualization/2021/02/16/data-relat...
- hctaw 6y agoPerhaps pick a better name that isn't confusing. In industry what your definition refers to is called "generic programming" if I understand correctly.
- viebel 6y agoI didn't choose the term "Data-Oriented programming" It was used by Cognitect folks to promote clojure [1] and actually it was coined by Eugene Kutznetsov in 2004 [2] As you know, naming is one of the two hard things in programming. [1]: https://www.cognitect.com/blog/2016/6/28/the-new-normal-data-leverage https://www.cognitect.com/blog/2016/6/28/the-new-normal-data... [2]: https://adtmag.com/articles/2004/08/05/data-integration-a-little-dop-might-do-you.aspx https://adtmag.com/articles/2004/08/05/data-integration-a-li...
- karmakaze 6y agoUseful: > Data-oriented design => Increase performance via Data layout > Data-driven programming => Increase clarity via Behaviour described by data > Data-oriented programming => via Reduce complexity via Data representation
- eternalban 6y agoHe's defined that elsewhere in a book he just wrote for Manning. What is mildly annoying is that he is not really asking HN for advice here. He is pimping his book.
- viebel 6y agoMy purpose here is not to promote the book but to learn from FP experts what they think about the relevance of DOP approach to FP languages.
- eternalban 6y agoWouldn't it be more honest to actually put that in your message and make it a "Show HN"? "I have a book on DoD and am looking for critical feedback from FP experts". p.s. given that I strongly disagree with your definitions of DO and FP. DOD/P: Data oriented design and programming is structuring code in light of form, size, access patterns of data. Efficient access and ops on domain specific data is the name of the game. Strictly speaking, this is an optimization approach and not a genuine general programming paradigm. In sum: organize your data layout to maximize efficient processing suited to your application. (DB analog: 1st normal form is DoD. 5th normal form is anti-DOD.) FP: true to its mathematical origins, FP is mainly about transformation of data via a methematical treatment. Arguably, algorithms are far more central to FP than data. A significant manifestation of this fact is the existence of "lazy" and "strict" evaluation in FP runtimes which flies in the face of the primary concerns of Data Oriented Programming (which came from gaming). FP in no way addresses memory layout as a primary concern. FP is a conceptual general purpose paradigm.
- viebel 6y agoPlease, don't confuse DoD and DoP
- mercer 6y agoI feel you're making a distinction that some people decided to make, but that is not really widely shared by others to warrant imposing it. I see you also posted two differently-titled links to your "Data Oriented Programming" book last month. That does make it feel a bit like you're submarining your book with an 'Ask HN'. My apologies if I sound negative. On a more positive note: perhaps write a good blog post about this, and perhaps the core of what your book is about? I imagine that would be much more appreciated than just a low effort link to the book or "Ask HN".