4 ms·
> 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 wr
by m_mueller 3y ago
> 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.
- inopinatus 3y agoAgreed. 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
- m_mueller 3y agoYep. 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.