10 ms·
Brad Cox: when OOP was about “Software-ICs” and micro-transactions
- ChrisSD 7y agoIt's a shame that, in the minds of many, OOP has come to mean only: * chuck everything vaguely related in a class * share code by using inheritance IMHO, the way Java and C++ have been taught (in practice, if not by teachers) has done a disservice to OOP. So much so that many programmers now don't consider languages to be OOP unless they have the class keyword and inheritance.
- solipsism 7y agoIf you care about this, my advice is to not rail against words taking on new meanings. That's how language works, and it's a losing battle to fight against it. Just take what you believe is the better definition of OOP and rebrand it.
- AlchemistCamp 7y ago> That's how language works, and it's a losing battle to fight against it. The very name of this site is a powerful argument to the contrary. Slashdotters initially dissed it, saying the word "hacker" (as in coder or builder as opposed to criminal) should be retired. Now the older sense of the word is widespread enough that people halfway around the world are aware of hackers in the sense that PG named this forum. Indie Hackers is only further cementing the reversal of the trend that once appeared inevitable.
- js8 7y agoBernie Sanders calling himself "socialist" (although he could also use social democrat) is a very similar example.
- solipsism 7y agoHackers don't have the need to convince anyone else of what the word hacker means. It is of no consequence what "regular people" think we mean when we say hacker. We have our forums and our and we all know what it means. But if we were in a situation where it mattered what other people I thought the word meant, then we would be fucked. And that is evident by just talking with regular folk and asking them what they think about hackers. The situation with OOP is different. It is our community itself that uses the word incorrectly (according to some people, including the original commenter).
- monocasa 7y agoI've got a linguistics minor. The concept here is prescriptivism versus descriptivism. The linguistics community overall has a huge emphasis on descriptivism. Trying to enforce consistency of language is a Sisyphean task, and in a lot of ways is an element of imperialism. Words change, grow, gain and lose definitions and shades over time. Document the new uses, and let people live their lives.
- ChrisSD 7y agoI don't see things in such absolutist terms as that. For everyday language, sure, I'm more than happy to go with the flow. For technical language we need a relatively stable, agreed upon terminology. Terms that flow and change too freely makes communication very difficult and often leads to people having pointless arguments due to fundamentally misunderstanding what each person is saying. And I do disagree that it's Sisyphean. Raising awareness can and does influence how words are used (especially within a group).
- anoncake 7y agoThe meaning of a term depends on its usage. That is not a matter of opinion, it's how language, including technical language, works. Currently "OOP" roughly means [Alan Kay's vision] or [Java-like]. That is an imprecise and mostly useless definition but it's the one it has, whether we like it or not. A stable terminology is desirable and that's why we shouldn't redefine "OOP". Think of it like an API. What's more backwards-compatible: changing the behavior of oop() or deprecating it in favor of javaLikeProgramming() and kayProgramming() ?
- hombre_fatal 7y agofwiw, a minor (so, ~4 uni classes) is not what I would flex as credentialization in a subject. Especially when you go on to bring up such an elementary part of linguistics. It's kind of like introducing yourself as a compsci minor and then explaining OOP vs FP. I'd just leave off the creds, there's no need.
- monocasa 7y ago
- goto11 7y agoIt is futile to rail against other people using words "wrong". But that doesn't mean you can't use words in the "correct way" yourself. If you are influential enough it may even have an effect. In the case of "hacker" it has a different meaning in the media and the general population, but this is not a problem because the audience of HN understands the intended meaning.
- mwcampbell 7y ago> The very name of this site is a powerful argument to the contrary. In our little bubble, perhaps. But I'm pretty sure that to my family and non-techie friends, "hacker" has only the negative meaning. That's why, when I tell them in general terms about what I'm doing during a hackathon at work, I don't use that word.
- MaxBarraclough 7y ago> many programmers now don't consider languages to be OOP unless they have the class keyword and inheritance. If a language doesn't support inheritance, in what sense is it an object-oriented programming language? It's true that you can use OOP principles in languages that don't have language-level support for OOP. The canonical example of this is the GObject library for C. That doesn't tell us how we should use the term object-oriented programming language though. I don't see why we'd use a more expansive definition.
- magicalhippo 7y agoThinking off the top of my head, how about a language that only had interfaces (ala COM)? Implemented by non-inheritable objects, using delegation instead of inheritance to share code. I imagine some syntax sugar to help with the delegation to make it less cumbersome.
- hhas01 7y agoSelf doesn’t have classes or inheritance, and it’s as [single-dispatch] OO as they come. (Certainly moreso than something like C++, which wouldn’t look out of place on a Melanesian island. Never could figure why C++ and all its typed kin would choose to dispatch [dynamically] on only one argument instead of on all. Playing to their weaknesses, no?)
- MaxBarraclough 7y agoMy guess is that by going with single dispatch, you get clear 'ownership' in terms of methods^H^H^H^H^H^H^H member-functions belonging to classes. Can't say I know a lot about multiple-dispatch though.
- int_19h 7y agoIn every sense. Prototype-based OO has been a thing for a long time now. If you look at the entire breadth of OO languages and see what they have in common, there's really only two things that are truly common: object identity, and some form of dynamic dispatch based on that. Everything else - inheritance, encapsulation etc - is optional.
- discreteevent 7y agoHe references the Byte magazine Smalltalk issue. There was another issue much later that looked at why objects failed but actually they didn't. They succeeded but they weren't called objects. They were called Visual Basic controls/components. These were a runaway success. VB despite it's limitations enabled a massive amount of software to be written quickly and easily mainly through re-using commercial components. But the components were completely encapsulated. Black box, no source code, no inheritance. You could argue the same for services today. Services are software ICs, you can call them objects it whatever you like but they achieve Brad Cox's objective, which is all that matters. (It's just a pity that people think that a service/component has to run in a separate process always, unlike VB)
- r00fus 7y agoI think the concept of software "parts" (similar to the auto industry - many of the components are made by 3rd parties) is only tangentially related to object oriented programming. There were always APIs but they're still parts with an exposed interface - now just distributed over the Internet "as a service".
- imglorp 7y agoI think we have succeeded at software IC's beyond our wildest dreams at the time: standard, third party components with mostly understood behaviors, documents, and catalogs to obtain them. Almost everything except C has web loadable modules and online docs (analogous to IC data sheets in retrospect!) at this point, whether it's Perl's CPAN (going back to 1995) or Gems or MVN or whatever through obvious L-Pad disasters and now containers and various Hubs. edit. What we didn't dream of when the Byte Smalltalk issue came out (should NOT have tossed mine :-) was the implications of networked module repos. Add one or two lines of code and the system goes out and gets a standard module and wires it in for you. This was not on the menu for people shopping for 74xx at Radio Shack and Digikey.
- chadcmulligan 7y agoThis was the book that defined components https://smile.amazon.com/Component-Software-Beyond-Object-Oriented-Programming/dp/0201178885/ref=sr_1_1?keywords=software+components&qid=1576875186&sr=8-1 https://smile.amazon.com/Component-Software-Beyond-Object-Or... At the time components were going to be the next level above objects - they were the black box that contained a lot of objects and provided a nice programmer interface. Unfortunately the ideas seem to have disappeared, Delphi is an even better example of a component model than VB was imho.
- ilovecaching 7y agoIf you want to really see OOP in action study Erlang. As the late great Joe Armstrong says in his introductory book, Erlang is a real OOP system - objects can only communicate through message passing. There is no notion of visibility, friendship, inheritance, etc. Objects can hold state and pass messages and that's it - which coincidentally makes concurrency dead simple. What most people think of when they think OOP is C++, Java, and Python which got OOP completely wrong and ruined our perception of OOP. They also tried to use their misshapen OOP hammer on every problem they could find to the point that it’s an overused meme. These days you see languages actively trying to distance themselves from OOP as a form of enticement (Rust and Go being the two prime examples).
- fiddlerwoaroof 7y agoIn a dynamically-typed message-passing system, inheritance is just automatically delegating messages to another actor and possibly modifying the results. Erlang may not have explicit inheritance, but people almost certainly implement inheritance-like actor structures to achieve extensible message dispatch.
- zozbot234 7y ago> inheritance is just automatically delegating messages to another actor and possibly modifying the results. I don't think this is true. Objects can message themselves as part of base-class code; implementation inheritance means that this has to involve a level of indirection and dispatch, not just explicit delegation.
- fiddlerwoaroof 7y agoThis isn't always implicit, though: python's explicit self is still "object-oriented"
- xscott 7y ago> These days you see languages actively trying to distance themselves from OOP as a form of enticement (Rust and Go being the two prime examples). They definitely distance themselves from inheritance. However both Rust traits and Go interfaces look to me like they're there to appease people who like the .method() calling syntax. (I know there's more to the story than that, particularly for Rust and its type system...) I think either could've gone with multimethods or overloaded functions and have been better for it, but a lot of people seem to really like the object.method() look.
- protomyth 7y agoSuperdistribution was a pretty good book. I guess we went a really different direction after the Visual Basic component years. I keep coming back to Superdistribution, Visual Basic components (VBX/OCX), and the concepts from Mirror Worlds[1] (tuples spaces) and wonder if there is still some paths to look at down those roads. 1) Mirror Worlds: or the Day Software Puts the Universe in a Shoebox...How It Will Happen and What It Will Mean
- DonHopkins 7y agoNice book, but it's too bad David Gelernter's brain went bad. https://www.washingtonpost.com/news/speaking-of-science/wp/2017/01/18/david-gelernter-fiercely-anti-intellectual-computer-scientist-is-being-eyed-for-trumps-science-adviser/ https://www.washingtonpost.com/news/speaking-of-science/wp/2...
- protomyth 7y agoGiven the false reporting done by the Washington Post on the Covington kids when they had video of the incident, I place no value in their reporting. Thanks for dragging politics into this discussion.
- DonHopkins 7y agoExcept for the fact that the Washington Posts' reporting in the vast majority of cases, including Watergate and the Iraq War and Ukrainegate, is historically dead-on accurate and excellent and award-winning, and when they DO make mistakes, they actually admit it and correct it, as they already did in the case you're complaining about: https://www.washingtonpost.com/nation/2019/03/01/editors-note-related-lincoln-memorial-incident/ https://www.washingtonpost.com/nation/2019/03/01/editors-not... Your attempt to dismiss everything they write out of hand because of one mistake they already admitted and corrected, and instead mindlessly parroting the propaganda of a pathological liar who never admits any of his many mistakes, and has peddled at least 13,435 documented lies during his term, is the very definition of dragging politics into this discussion, and it's intellectually dishonest of you to project like that. You're the one who first dragged a demented political hack-job into this discussion, who was angling for a job in the Trump administration sabotaging science, denying climate change, and promoting Intelligent Design. https://whyevolutionistrue.wordpress.com/2019/05/17/computer-scientist-david-gelertner-drinks-the-academic-kool-aid-buys-into-intelligent-design/ https://whyevolutionistrue.wordpress.com/2019/05/17/computer... >Computer scientist David Gelernter drinks the academic Kool-Aid, buys into intelligent design: I’ve pondered at great length how a man can be apparently as intelligent as Gelernter, yet so susceptible to the blandishments of Intelligent Design—and so ignorant of the evidence that refutes it. Honestly: Do you also choose to deny anthropogenic climate change (and Darwinian evolution for that matter) and push Intelligent Design, just like Gelernter does, and to gullibly believe Putin's propaganda about Ukraine interfering in the elections instead of Russia, just like Trump does? https://yaledailynews.com/blog/2017/01/25/gelernter-denies-man-made-climate-change/ https://yaledailynews.com/blog/2017/01/25/gelernter-denies-m... >Gelernter, potential science advisor to Trump, denies man-made climate change: “For human beings to change the climate of the planet is a monstrously enormous undertaking,” Gelernter said. “I haven’t seen convincing evidence of it.” https://en.wikipedia.org/wiki/David_Gelernter#Controversial_positions_on_science https://en.wikipedia.org/wiki/David_Gelernter#Controversial_... >David Gelernter does not believe in anthropogenic climate change. In July 2019, Gelernter challenged Darwin's theories. By the way, Gelernter's also a patent troll sell-out, whose ideas are unoriginal: https://arstechnica.com/tech-policy/2016/07/apple-will-pay-25m-to-patent-troll-to-avoid-east-texas-trial/ https://arstechnica.com/tech-policy/2016/07/apple-will-pay-2... >Apple will pay $25M to patent troll to avoid East Texas trial >When Mirror Worlds ran out of appeals, it gave up and sold its patent—to another patent troll called Network-1 Security. In 2013, Network-1 created a similarly named LLC, this time called Mirror Worlds Technologies, and filed another lawsuit (PDF) in the Eastern District of Texas. The same patent, No. 6,006,227, was used to sue the same target, Apple. >When Apple started to come out with features like Cover Flow and Time Machine, Gelernter believed his own ideas being used. "I know my ideas—our ideas—when I see them on a screen,” he told the New York Times in 2011, while his case was on appeal. To address your question: You may "wonder if there is still some paths to look at down those roads", but if you follow the path that leads to Mirror Worlds, you'll get sued for patent infringement by a troll. So exactly which facts of that article do you disagree with? And where is your proof that what the Washington Post and Yale Daily News and Wikipedia and many other sources (including himself) say about Gelernter is false, and that he does actually believe in anthropogenic climate change and Darwinian evolution, in spite of his own quoted words? Or that he was the first person to invent the idea of presenting documents in chronological order? Or is it all based on your unsupported uninformed false opinion that everything the Washington Post says is "fake news"? Don't even bother answering if you don't have any proof.
- jasim 7y agoTwo interesting ideas that helped me get insight into OO: 1) An object is a poor man's closure; and a closure is a poor man's object. 2) Most object-oriented programming is done with mutable state, which muddles what OO is. You don't really need state to have objects. In a closure, the lexical scope is preserved, and the functions defined in it can access it any time. This is very similar to what an object does: https://stackoverflow.com/a/2498010 https://stackoverflow.com/a/2498010 When objects are immutable, one gets to truly appreciate the elegance of grouping both data and their functions together: https://dev.realworldocaml.org/objects.html#scrollNav-3 https://dev.realworldocaml.org/objects.html#scrollNav-3
- tudelo 7y agoRE 2 do you mean you don't need to have mutable state to have objects? Unless I have a huge misunderstanding of what you mean by 'state', it seems like state is necessary for objects to exist..
- lelandbatey 7y agoI think the grandparent comment is saying that you do not need your state to be mutable; that writing software where your state is immutable is useful and elegant.
- tudelo 7y agoYeah that is what I was trying to clarify, I guess my comment was equally confusing because I am getting responses trying to fill in words that the OP may or may not have left out accidentally
- derblitzmann 7y agoOne book[1] I read explained this in detail, amongst other similar concepts. It was really interesting and helped me think of how functional concepts could work in OOP languages. 1: https://www.elegantobjects.org/ https://www.elegantobjects.org/
- mhd 7y agoI don't think this is a failure of OOP itself, nor does it come down to any language's shortcomings. I think it's mostly a market failure. The units of trade were complete software products and/or services/apps these days. Mostly because that's what the end users actually see on the desktop, the atomic unit of software is huge and perceptible. Once upon a time, it looked like it could be different. Component-oriented systems arose. COM, CORBA, CommonPoint, Taligent, D'OLE etc. (Heck, one might even argue for Amiga filetypes and embedded X windows to belong in the same category) But apart from UI Widgets (ie. windows controls for VS or Delphi), it never seemed like there was a marketplace for it. It also was quite hard to sell to managers, as it's something you can't put in a box or have a big trademark for it. So we ended up with fast food joints and black-box-systems, no ICs, condiments, recipes etc. Open Source could've been an answer/alternative, but the OSS world mostly copies stuff from the programmer's day jobs. (Gnome actually started out with CORBA and KDE had some component structure, too, but that doesn't appear to be anyone's focus, compared to copying notifications and doing flat redesigns)
- travisgriggs 7y agoVeteran Smalltalker-turned-modern-iot-embedded-polyglot here. OOP is a difficult to judge because it became such a big envelope. Alan Kay famously said in 1997 "I invented the term Object Oriented Programming, and this [C++ and Java] is not what I had in mind." He would later even tell the Smalltalk community that even that wasn't spot on, only an early step, to what he was really after in his visionary's quest that would create a DynaBook that would increase world peace (visionaries always reach big). In my own journeys, my own personal conviction came to be that the "paradigm shift" with the OO movement was to learn to bind behavior to data. This (IMO) fits Kay's ideas about cellular biology and the inspiration he embraced with his ideas. It's all about binding behavior to data. Everyone should read that byte magazine (because apparently 500+ pages was a magazine), especially Peter Deutsch's section on block closures. Smalltalk did more with closures than any other language I've used since. Because closures are objects too.
- RossBencina 7y agoThis article was an excellent read. Like other commenters, it reminded me of Clemens Szyperski's "Component Software" book. While a component model of software production has succeeded in some niches, it has (so far) failed to become a central organising principle for large scale software production. The article suggests that new micropayment mechanisms such as blockchain might enable Brad Cox's vision of pay-as-you-use software components. But I think this misses the point. I would argue that software differs from physical goods in important ways that make it a poor fit for this model. In particular, software is cheap to modify, evolve and customise, but expensive to specify independent of implementation (cf. Refactoring, Agile processes versus ISO Standards Development.) One issue that Szyperski's book examined was the composition model (i.e. object model: COM, CORBA, JavaBeans, etc) used for defining interfaces between software components and how those interfaces can be composed. The idea of standardizing interfaces and composition mechanisms does not get so much attention today. It seems that things are currently balkanized into language communities, each doing their own thing. The industrial manufacturing concept of "interchangeable components" comprises of two things: (1) standardized specifications, (2) multiple independent manufacturers who are able to independently implement specifications. We do have this kind of practice in, for example, the specification and implementation of the C++ standard library. But that's not how most software is developed, and it is commonly held that it is not how most software should be developed. On the other hand, we do have "component reuse" in the form of software libraries -- but the interfaces are unique and idiosyncratic to each library, not standardised, and there is usually a single "manufacturer".