Re:The Case Against OOP Is Wildly Overstated
by michaelcampbell on Friday July 31, 2020 @10:35AM
(#24008930)
OOPs original premise is homoiconicity? Really?
I'm pretty sure what was meant by 'code is data' is that a lot of OOP training encourages you to "bundle the code and the data in an object". People take that to heart, and...bundle code and data into objects. Whether or not those functions and that data really belong in the same object is an afterthought, if considered at all.
Re:The Case Against OOP Is Wildly Overstated
by TheOtherHobbes on Friday July 31, 2020 @12:44PM
(#24010494)
I'm not sure anyone really knows what OOP's original premise is.
There are various legends, and they mostly conflict with each other.
Re:The Case Against OOP Is Wildly Overstated
by MasonOfSpoons on Friday July 31, 2020 @05:46PM
(#24014567)
It feels a bit like a rhetorical device to discuss OOP in any context other than the version of Java that's currently in widest usage.
Re:The Case Against OOP Is Wildly Overstated
by goatlover on Friday July 31, 2020 @01:47PM
(#24011347)
It was whatever Simula and then Smalltalk's goals were.
Re:The Case Against OOP Is Wildly Overstated
by winstonewert on Friday July 31, 2020 @10:55AM
(#24009214)
I presume "code and data are really the same thing" is intended to refer to way that OOP binds code and data together.
Re:The Case Against OOP Is Wildly Overstated
by throwaway894345 on Friday July 31, 2020 @10:50AM
(#24009121)
I'm not sure "code is data" necessarily means "homoiconicity", but it could mean "first-class functions" (or at least that's what I think of when I hear the phrase; maybe I'm wrong); however, I'm not familiar with anyone who argues that these are fundamental OOP features (perhaps Smalltalk had first class functions, but for a very long time the most popular flavors of OOP did not).
Re:The Case Against OOP Is Wildly Overstated
by _old_dude_ on Friday July 31, 2020 @11:10AM
(#24009374)
yes,
Homoiconicity is about having the same syntax for both structure and data.
First class functions means there is no conversion, again at syntax level, between a function and a value.
Mainstream languages all have a way to see code as data, it's function pointer in C, delegate and lambda in C# and first class functions in Python or JavaScript.
Re:The Case Against OOP Is Wildly Overstated
by throwaway894345 on Friday July 31, 2020 @01:15PM
(#24010895)
I understand the differences between homoiconicity and first class functions and even that modern languages often support them, but that support is typically an artifact of a functional (and not OOP) influence with the exception of function pointers in C whose origins im not sure about except that it doesn’t come from OOP. The point is that despite the confusion about “what does OOP mean, really”, there are no prominent arguments that suggest that homoiconicity or first class functions are defining characteristics.
Re:The Case Against OOP Is Wildly Overstated
by prostodata on Friday July 31, 2020 @01:33PM
(#24011165)
I think both conceptions are important. On one hand, some code is naturally related to certain data and hence we should accordingly design the program. On the other hand, complex and distributed programs have code which must be dynamically bound to different data. OOP focuses on only one aspect but does it very well. How to adequately support the opposite aspect is not clear. At least there are many ways how this can be done.
This is grevious error, IMHO, that leads to nothing but problems: endless boilerplate code, lots of "interfaces" that essentially do nothing (that couldn't be done directly with said data), and debugging nightmares.
I much prefer to work with systems where code and data are separate and never the twain shall meet.