3 ms·
Not an expert but have a strong opinion. Many developers reject DOD because "performance isn't that important in [some software type]". However, using DOD can h
by Tomis02 4y ago
Not an expert but have a strong opinion. Many developers reject DOD because "performance isn't that important in [some software type]". However, using DOD can have other benefits unrelated to performance, IMO.
From the article: "DOD promotes solving concrete problems as opposed to generic ones". Given that DOD is biased against unnecessary abstractions, this can improve the code's readability (e.g. no more Abstract Factory Manager Generators) and thus maintainability. As Mike Acton pointed out, it's very useful to be able to easily reason about what your software is doing (not just a particular class, in isolation).
The quote you mentioned seems to be in opposition to the OOP-centric view of the world, and hints to alternative ways of organizing code (PODs and transformations).
- memco 4y agoAndrew Kelley gave a presentation where he discusses how DOD was actually giving significant performance improvements for zig: https://vimeo.com/649009599 https://vimeo.com/649009599. DOD may not be explicitly concerned with performance, but it could provide performance improvements in some situations.
- runevault 4y agoDOD 100% gives performance benefits. The problem becomes some people acting like that is the ONLY benefit, which is why you see more and more pro DOD people trying to make the other benefits clear so that people will stop thinking it is ONLY an optimization technique, because then people who aren't as worried about blazing fast performance will still consider it in case the other benefits help their problem case.
- memco 4y agoPart of why I reference the talk is that he was advocating for it in a broader context because he found it simplified the architecture and reduced memory and execution time for his project which isn’t a game. I would love to see more exposition on the subject in different contexts so people get a feel for what DOD might look like in different spheres of development especially in more general programming environments. I don’t yet have much experience with it myself but I know that each time I have explored a different design pattern I have learned useful things so I look forward to learning more about it and finding ways to use it.
- runevault 4y agoTotally, the Zig stuff has me super excited. I've wanted to see what DOD would do in a compiler for a long time. Also going composition in a way that doesn't require classes in the traditional sense can allow easier transformation of how various types of data are processed. For me that might be the most exciting part of DOD.