News for hackers. Stuff that matters.
Re:Data-Oriented Design by m_mueller on Monday July 03, 2023 @09:28AM (#36572585)
> I don’t accept that it’s wholly incompatible with OO

I don't think it is, not even in Java. If you use its primitive array and value types, you can easily wrap this in a data wrapper class with functional interfaces, which then can be used quite elegantly in the rest of your code in an OO way - you just don't box all the records into objects.

Re:Data-Oriented Design by inopinatus on Monday July 03, 2023 @09:57AM (#36572938)
Agreed. Honestly I think the hardest part here is programmer mindset - when you suggest that identity is fluid and records don’t have to correspond to a class hierarchy some folks get a panicked look going on, like you just claimed to eat their pets
Re:Data-Oriented Design by m_mueller on Monday July 03, 2023 @12:11PM (#36575004)
Yep. Funny story, this was actually a coding interview homework for a question with order of millions of data rows from a file. The exercise required 10s timing requirement, so I decided to do it data centric from start. Interviewers found my style ‚non idiomatic‘, but probably never thought about why my version was done in fractions of a second.
Re:Data-Oriented Design by zx8080 on Tuesday July 04, 2023 @12:25AM (#36582219)
Did you pass the interview?
Re:Data-Oriented Design by m_mueller on Tuesday July 04, 2023 @03:14AM (#36583280)
I did and got the offer. In the end it didn't work out however (better offer elsewhere).