Skip to main content
37 events
when toggle format what by license comment
Jun 12 at 11:39 comment added hegel5000 This answer has been quite helpful to me over the course of my career. It's been useful to be able to identify objects oriented systems, even when certain programming language features are not used. It seems to help the most when facilitating a choice by the client. I was also able to realize that most of what I've been doing with classes in C++ is identical to what I did before in Haskell; I hadn't switched to OOP at all, classes are just C++'s type definition mechanism, and OOP would have been an inappropriate choice for most of what I did.
May 23, 2017 at 12:40 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Apr 19, 2017 at 4:59 audit First posts
Apr 20, 2017 at 20:50
Mar 25, 2017 at 5:49 comment added k_g I was thinking of type classes in Haskell, specifically, but virtual dispatch can be effectively simulated in any of these languages by placing closures (bound methods) in a structure
Mar 25, 2017 at 4:26 comment added Jules @k_g - other than languages specifically marketed as object-functional (e.g. F#, OCaML), which functional languages have first class virtual method dispatch? I know none of the ones I've worked in (Haskell, SML, Miranda) do. LISPs are an edge case ... virtual dispatch isn't really first class in LISP, but then almost nothing is, due to the highly adaptable nature of the language.
Mar 24, 2017 at 20:56 comment added k_g Also, virtual lookup is also a feature in many modern non OO languages. Take any functional language, virtual method dispatch is basically equivalent to "code is data"
Mar 24, 2017 at 1:22 comment added Clayton Stanley This answer resonated with me after working with Common Lisp, where the message is always listed before the object.
Mar 23, 2017 at 14:37 comment added T. Sar @Jules This answer is somewhat theoretical in nature and is based on ancient concepts that don't really apply anymore. Trying to define "True OO" is akin to the fights that people defining taxonomies have regarding what family a given type of lizard actually belongs to - a nice curiosity but too subjective to be of any real use outside categorization exercises. Those types of definition blatantly ignore the point of calling a language OO in the first place, which is to give the developer the expectations of what he will find on a given language, more or less.
Mar 22, 2017 at 22:49 comment added Jules I think that suggesting that the definition of OO excludes the idea of objects interacting data held by other objects of the same class is too extreme. Yes, from a theoretical perspective it is nice to have perfect privacy for instances (and it certainly promotes a degree of encapsulation that can be useful at times), but in reality the vast majority of languages that are described as object oriented do allow private member access to objects in the same class, and this is a generally accepted feature of OO
Mar 22, 2017 at 22:33 comment added Jules @fishinear - I don't think that's a reasonable approach though, because almost all modern languages, whether or not they include OO, have some concept of encapsulation. See SML's modules, or Haskell's typeclasses, or just about any other non-OO language designed for anything other than small (e.g. scripting) applications. And then consider that there is at least one popular OO language that doesn't have first class support for inheritance (i.e. Javascript). That suggests that of your list, only virtual dispatch is actually an important distinguishing factor of OO languages.
Mar 22, 2017 at 16:51 comment added fishinear Agree with most comments here: messaging is most definitely NOT the key concept of OO. Just because it was the main concept in Smalltalk does not make it the main OO concept, the world has moved on since then. I would call encapsulation the main concept, virtual dispatch the second, and inheritance a third.
Mar 22, 2017 at 16:47 comment added Mason Wheeler @Jules I haven't gotten any memos about Ruby for maybe 5 years or so. :P
Mar 22, 2017 at 16:28 comment added Jules @MasonWheeler ... All Smalltalk influenced languages are dying? Funny, I didn't get the memo about Ruby.
Mar 21, 2017 at 22:24 comment added Justin Time - Reinstate Monica Considering that Smalltalk OOP is so different than what most people consider OOP, perhaps it's time it got a different name? I suggest SOUP, for Smalltalk Object-Utilising Programming.
Mar 21, 2017 at 20:48 comment added Aaron While there is some descent content in this answer, it is outweighed by the junk. A few peoples' ideas about messages does not define OO. "Java classes are not OO" is absurd and can only be said inside the warped definition of OO that you are using. Given your definition of OO, practically nobody uses OO paradigm and we might as well not discuss it because it's dead and not widely used.
Mar 21, 2017 at 11:22 comment added sdenham An interesting, if somewhat didactic, history, but you have not yet offered an answer. Given that this approach to language design was never widely adopted and is in decline, the answer here must be, empirically, 'no'.
Mar 20, 2017 at 22:57 comment added Paŭlo Ebermann I think the "messaging" aspect always concentrates on the calling, and forgets the answer (return value) coming back.
Mar 20, 2017 at 18:03 comment added T. Sar @JeremyP The development for iOS exploded after translators like Xamarin, that convert C# code to something that an iOS-based device can understand, showed up. If Objective-C was so miraculous, those tools wouldn't be so popular in the first place.
Mar 20, 2017 at 17:25 comment added JeremyP @MasonWheeler Apple makes almost all the profit in the Smartphone market. The software industry aimed at iOS is doing very nicely as a whole and so is the the software industry aimed at Mac OS. However this is irrelevant to what is a technical discussion. The example of Objective-C shows that your assertion about the message sending paradigm was wrong.
Mar 20, 2017 at 17:18 comment added Mason Wheeler @JeremyP The ecosystem that never got off the ground on the desktop, briefly had some success in mobile due to first-mover advantage, but has then been flat-out hemorrhaging market share ever since a halfway-decent Android showed up? That Apple ecosystem?
Mar 20, 2017 at 16:40 comment added JeremyP @MasonWheeler The Smalltalk message sending paradigm works very well on the single computer level. The entire Apple ecosystem (pre-Swift) proves that.
Mar 20, 2017 at 16:40 comment added VGR I’m not sure I agree with everything here, but amen to that last paragraph on inheritance.
Mar 20, 2017 at 16:29 comment added The Photon Even though people who use Smalltalk and people who use Java both say they are doing "OO", it doesn't mean they are doing the same thing. Some people may wish the Smalltalk paradigm had come to dominate programming practice, but it didn't. Maybe we should rename this paradigm to "message-oriented programming" to avoid confusion in the future.
Mar 20, 2017 at 14:47 comment added T. Sar It's also worth to note that the concept of Object-Oriented languages evolved a lot. Those ancestral concepts may not be as true nowadays with a lot of languages ditching the old models and embracing multi-paradigms. Look at C#, for example - that language mixes up almost everything under the sun at once and, while mostly referred as a OO language, it is actually a mix of different paradigms. That enables it to be a really expressive tool for developers all around. Also, Class-Based OO is one of many equally valid flavors of OO programming.
Mar 20, 2017 at 14:40 comment added T. Sar I'm not sure if I agree with that "only instances of interfaces are objects" statement, and the text around it. The answer overall is good and I threw in a +1, but this part seems more like semantic nitpicking over a implementation choice than anything else. There is not a "only true way" of designing a object-oriented language, and different takes on it are equally valid. Blanket statements like "this is the correct way that this subjective thing should behave" are more damaging to budding developers than helpful.
Mar 20, 2017 at 14:02 comment added Robbie Dee All good, but doesn't answer the question...
Mar 20, 2017 at 13:56 comment added Mason Wheeler @Luaan I never said it wasn't. But there's more to "message passing" than just dynamic dispatch.
Mar 20, 2017 at 13:54 comment added Luaan @MasonWheeler "Objects with virtual methods" is still dynamic dispatch. Yes, there's many reasons why Smalltalk wasn't successful, and rigid adherence to the model isn't very conducive to good performance (Erlang and other actor models are the main exception, for various reasons), but in many of those non-Smalltalk languages still get a lot of "do it this way, unless there's a good reason not to". Keep interfaces small. Hide concrete classes behind abstractions with no implementations. Favour composition over inheritance. Is there a problem? Fine, drop it. Flexibility is important.
Mar 20, 2017 at 13:54 comment added steakexchange @MasonWheeler Could you maybe elaborate on your comment in an answer since you have quite an opposite view to what Jorg is saying?
Mar 20, 2017 at 13:46 comment added Mason Wheeler @steakexchange No. "The essence of OO," the thing that makes it truly distinctive, is objects with virtual methods. There's a reason no one uses Smalltalk: the message-passing system works very poorly at individual-computer scales. Every time some well-intentioned but naive language designer tries to reimplement Smalltalk principles, it ends up failing. (The most recent example would be Objective-C, which no one would have ever used if Steve Jobs hadn't shoved it down the entire iOS community's throats. It's never found any traction outside the Apple ecosystem, and there's a reason for that.)
Mar 20, 2017 at 12:57 comment added steakexchange So the essence of OO aren't objects but messaging, which enables to construct software that grows, similar to the Internet?
Mar 20, 2017 at 12:57 comment added Mason Wheeler Sorry, but this is so incredibly wrong. Alan Kay may have come up with the term, but the principles were around before Smalltalk. Object-oriented programming derives from Simula, and its OO style had nothing to do with "messages". Pretty much every OO language that's been successful has run on the basic principles set forth in Simula--the same ones we see in Java--and Smalltalk-style OO has been a failure in the "marketplace of ideas" every time it's reintroduced, because it just doesn't work very well at all. The name was the only truly meaningful thing Kay contributed.
Mar 20, 2017 at 11:50 comment added JeffO +100 - We put inherent blame on things because they're being used improperly.
Mar 20, 2017 at 11:49 history edited Jörg W Mittag CC BY-SA 3.0
added 6703 characters in body
Mar 20, 2017 at 11:34 history edited Jörg W Mittag CC BY-SA 3.0
added 6703 characters in body
Mar 20, 2017 at 11:25 history edited Jörg W Mittag CC BY-SA 3.0
added 6703 characters in body
Mar 20, 2017 at 11:18 history answered Jörg W Mittag CC BY-SA 3.0