by pramodbiligiri on 5/13/24, 11:36 AM with 23 comments
by GuestHNUser on 5/15/24, 8:15 AM
Ultimately, I find the thesis of the paper fundamentally wrong for presuming that OOP is somehow more beneficial than other approaches to dynamic dispatch. Moreover, the use of interfaces in thr paper are more restrictive to code structure, and in turn, are more likely hurt code reuse than help it.
Interfaces are an inherently weaker form of the age old Operation Code and data packet paradigm. Take the Widget interface the paper gives as an example (page 5). This interface has now been set in stone. Any additions that would be useful for the widget interface, say OnClick(), will require a breaking change. This is because all code using the old interface will have to be updated and recompiled to satisfy the new interface requirements (even if a widget won't functionally change from using said new interface). Meanwhile for code using op codes, a new op code value is defined and nothing in the old code is required to change. (This assumes that this old code will perform a no operation for the new opcode, which historically has been the case for systems that use this method).
In fact, Win32 did exactly this opcode and data packet protocol for its message loop to great long term success. They have regularly extended their existing code without breaking backwards compatibility of older versions. The longevity of code in typical OO systems pales in comparison.
[0] https://harmful.cat-v.org/software/OO_programming/why_oo_suc... [1] http://stlport.org/resources/StepanovUSA.html
by KingOfCoders on 5/15/24, 8:57 AM
Most applications people use are on the web or mobile today. Every application on the web or mobile (Figma, Notion, ...) is basically a silo or one way street.
by mrkeen on 5/15/24, 8:58 AM
Since virtually any language can delegate behaviour this way, the above claim is really saying that every language carries the essence of objects. (And I agree - for this definition of objects).
So the follow-up question becomes "What's so special about about languages which brand themselves as OOP - as opposed to another paradigm?"
by manu3000 on 5/15/24, 11:39 PM
by Log_out_ on 5/15/24, 11:43 AM