View Poll Results: Should OOP be in every new language??

Voters
22. You may not vote on this poll
  • Yes, OOP is aboslutely important in developing any new language

    6 27.27%
  • No, new languages could be popular and live long-time without OOP

    16 72.73%

Should OOP be any new language priority??

This is a discussion on Should OOP be any new language priority?? within the General Discussions forums, part of the Community Boards category; Originally Posted by maxorator Seriously, you sound like your whole life involves only one software project in one company. Are ...

  1. #61
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by maxorator View Post
    Seriously, you sound like your whole life involves only one software project in one company. Are you saying we shouldn't have general purpose languages?
    Uh... You think C++ isn't a general purpose language?

    BY a "language that includes everything" I meant EVERYTHING. Somebody mentioned that a good language should do everything. Okay great. Let's mix all known languages and provide a meta-syntax allowing us to switch between them in the same program. This would be good, right?

    THAT would be stupid.

    There will always be differences in style between programmers. But when programmers are regularly finding each other's code absolutely incomprehensible, then there is something wrong. You could try enforcing stricter coding standards, but why not just select a less admissive language in the first place?

    This is the biggest problem with Perl. Not only is there "more than one way to do it," but this is one of the language's MANTRAS. And look at some of the god-awful code written in Perl. It works, but could you modify it?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  2. #62
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by CornedBee View Post
    Uh ... inheritance and polymorphism are the defining traits of object-oriented programming. Objects without them is just object-based programming. Useful, but something different.
    I am familiar with this piece of orthodoxy.

    What you are saying, then, is that "object oriented programming" is "object-based programming" with inheritance and polymorphism, and that "object-based programming" is "object-oriented programming" without inheritance and polymorphism.

    In either case, the essential element is the object, not polymorphism or inheritance. OOP would be pretty silly if it was just polymorphism and inheritance without objects.

    They may be "defining traits" in this semantic distinction, CornedBee, but that does not mean they are any more significant than their real use value. In reality, the importance of the distinction is with regard to languages where these traits literally do not exist. I suppose you could refer to doing "object-based programming" in an OO language if you are not making use of polymorphism or inheritance, but that distinction is redundant.

    So it is still true that:

    Quote Originally Posted by MK27 View Post
    AFAIK you do not have know anything about either one to grasp the basics of OOP in most OO languages.
    If you want to keep the orthodox semantics, I would say "the basics" do not much involve these "defining characteristics", since the "base" of OOP is object-based programming.
    Last edited by MK27; 06-12-2009 at 11:03 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #63
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by brewbuck View Post
    This is the biggest problem with Perl. Not only is there "more than one way to do it," but this is one of the language's MANTRAS. And look at some of the god-awful code written in Perl. It works, but could you modify it?
    So, if I see a piece of C++ (or Java or even BASIC) that I don't understand, can I say the same thing about that?

    There is more than one way to do it because perl has *a lot* of very powerful syntax. If you know the syntax, you will be able understand "how something was done" even if it is not "how you would do it". If you do not understand the syntax involved, you will have a problem.

    You can write "god-awful" code in anything. Believe me! It may be true that perl is a focal point for (or favourite amongst) programmers with certain temperaments or inclinations (because they are free to be so); hopefully they at least understand each other. Why should they care how (non perl users) feel about it? There are clear warning signs, I think, when you walk in the door. It is not for the faint of heart, but the rewards are many...

    Talking about a "language that does everything" is as silly as talking about a "programmer that pleases everyone". You do not have to please everyone. I won't won't let you
    Last edited by MK27; 06-12-2009 at 11:03 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #64
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by MK27 View Post
    You can write "god-awful" code in anything. Believe me! It may be true that perl is a focal point for (or favourite amongst) programmers with certain temperaments or inclinations (because they are free to be so); hopefully they at least understand each other. Why should they care how (non perl users) feel about it? There are clear warning signs, I think, when you walk in the door. It is not for the faint of heart, but the rewards are many...
    We're getting way off my point. I'm not ripping on C++ or full-featured languages. My original statement was that no, it isn't necessary for every new language to support OOP. Then somebody said that a good language should support EVERYTHING. Well, given that I don't think OOP is a necessity for every language, obviously I think that's patently ridiculous.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  5. #65
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,312
    Quote Originally Posted by MK27
    If you want to keep the orthodox semantics, I would say "the basics" do not much involve these "defining characteristics", since the "base" of OOP is object-based programming.
    The thing is that you used "basics" to mean "the only essential aspects" rather than "base" or "foundation", since you stated that "inheritance and polymorphism are non-essential aspects". With such a definition, I think that the basics of OOP should include inheritance and polymorphism, by virtue of them being "defining characteristics".

    EDIT:
    Quote Originally Posted by MK27
    In either case, the essential element is the object, not polymorphism or inheritance. OOP would be pretty silly if it was just polymorphism and inheritance without objects.
    I say that there is a difference between saying that the object is the only essential element and saying that the object is the most essential element. The latter is what I would pick.

    Quote Originally Posted by MK27
    In reality, the importance of the distinction is with regard to languages where these traits literally do not exist.
    I agree. In those cases, I would say that the programming language does not natively support OOP.

    Quote Originally Posted by MK27
    I suppose you could refer to doing "object-based programming" in an OO language if you are not making use of polymorphism or inheritance, but that distinction is redundant.
    Well, when I am actually programming I do not really care about the distinction between paradigms. But when we have a thread like this, we have to care about defining the terms.
    Last edited by laserlight; 06-12-2009 at 11:42 AM.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #66
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by laserlight View Post
    Well, when I am actually programming I do not really care about the distinction between paradigms. But when we have a thread like this, we have to care about defining the terms.
    My point is that the only reason polymorphism and inheritance would be considered "defining elements" of OOP is to distinguish it from "object-based" languages. Keeping that in mind, it is inappropriate to say "inheritance and polymorphism are the defining traits" of OOP, which is what CornedBee did and obviously what s/he intended, otherwise that post has no purpose or meaning at all.

    I think it is also worth noting that javascript does not have traditional inheritance, but is still considered an OO-capable language. You could argue with that, but that will very much be going against the grain.

    When referring to programming with objects, the common parlance is to call this activity "object oriented programming". What CornedBee seems to be trying to do is say "Only I do OOP. You do not do OOP, you only think you do because you do not know what OOP is". At best that's childish. In all likelihood, CornedBee knows more than someone about OOP and someone else knows more than CornedBee.

    It would be a stupid argument to start claiming that "you are not doing OOP unless you are making use of polymorphism and inheritance". Also IMO, polymorphism is (historically) a solution to certain problems in strongly typed languages and not at all an essential element of what OOP is functionally; it is essential to making OOP functional in some languages.
    Last edited by MK27; 06-12-2009 at 12:14 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #67
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,312
    Quote Originally Posted by MK27
    My point is that the only reason polymorphism and inheritance would be considered "defining elements" of OOP is to distinguish it from "object-based" languages. Keeping that in mind, it is inappropriate to say "inheritance and polymorphism are the defining traits" of OOP, which is what CornedBee did and obviously what s/he intended, otherwise that post has no purpose or meaning at all.
    Ah yes, I see what you mean now. That said, consider that the context of the post was in reply to your own assertion.

    Quote Originally Posted by MK27
    I think it is also worth noting that javascript does not have traditional inheritance, but is still considered an OO-capable language. You could argue with that, but that will very much be going against the grain.
    That would bring us back to brewbuck's assertion that "object-orientation is a property of a program, not a language", methinks.

    Quote Originally Posted by MK27
    When referring to programming with objects, the common parlance is to call this activity "object oriented programming".
    As I have no idea of the statistics, I can neither affirm nor deny this. After all, when people refer to "programming with objects", what exactly are they referring to? Do they fail to call it by some other name (besides OOP) due to ignorance, indifference, or because they really intend to mean what they say?

    Quote Originally Posted by MK27
    It would be a stupid argument to start claiming that "you are not doing OOP unless you are making use of polymorphism and inheritance".
    Why would that be a stupid argument? Depending on how we define "OOP", it seems reasonable to me.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #68
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by laserlight View Post
    Ah yes, I see what you mean now. That said, consider that the context of the post was in reply to your own assertion.
    "Possibly this is a narrow vision of OO derived exclusively from some specific language or languages" and I'll stick to it. I didn't want to say C++ because I knew defender's of the faith would start looking for a weapon...low and behold

    That would bring us back to brewbuck's assertion that "object-orientation is a property of a program, not a language", methinks.
    Okay. Even then it is sort of frivolous. In fact, there is no doubt in my mind that the term and the entire concept of "programming paradigms" is derived mostly from stupid arguments such as this one. Everything involved could still be discussed, and most likely in more concrete terms. Really, a better title for this thread might have been "Should new languages support classes and objects"? (nb. js is "classless"), but instead we have a silly term which seems to only lead to further silliness...


    As I have no idea of the statistics, I can neither affirm nor deny this.
    You don't have to deny or confirm it. It is pretty much a "sky is blue" kind of observation.

    Do they fail to call it by some other name (besides OOP) due to ignorance, indifference, or because they really intend to mean what they say?
    How many names should it have? Would it not be enough to say "language X supports objects but no inheritance" and be done?


    Why would that be a stupid argument? Depending on how we define "OOP", it seems reasonable to me.
    Yes, we can define it anyway "we" want. But again, the reality is, users of javascript refer to OO programming, in javascript. I'm sure there are other places where some ridiculous distinction could be wielded to make OOP not OOP. Why not just say what you mean: C++ is the only real computer programming language in the world?

    Someone may want to go on a crusade to have the scores of books about "Object Oriented Programming with Javascript" recalled, and implicitly class js programmers as "ignorant" for having perpetrated this hoax, and I guess dismiss js as stupid for not being C++. In which case, I hope you enjoy life without a web browser...
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #69
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Javascript supports prototype-based inheritance and due to its dynamic nature, it also supports polymorphism. In fact, duck-typing support as in Javascript and Python is a less constrained version of polymorphism.

    So you can do OOP in Javascript because the language supports the key concepts. I stand by my point, no matter how stupid you think it is. If you're not using these key concepts, you're not doing object-oriented programming. I stand by my assertion that what you said here
    AFAIK you do not have know anything about either one to grasp the basics of OOP in most OO languages.
    makes no sense at all. The basics of OOP is inheritance, if not in actual language syntax, then at least at a conceptual level. The basics of OBP is data hiding. You can actually have one without the other. (Python does not support data hiding, AFAIK.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #70
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,623
    No one wants to go on a crusade, but I think we're talking something very different now than we were before, since we are now debating how much OOPiness there is in existing languages like JavaScript. That's not really part of the original question. ...

    As I have no idea of the statistics, I can neither affirm nor deny this. After all, when people refer to "programming with objects", what exactly are they referring to? Do they fail to call it by some other name (besides OOP) due to ignorance, indifference, or because they really intend to mean what they say?
    You don't have to confirm or deny it. It is pretty much a "sky is blue" observation.
    If you asked 100 people what the color blue was, you might find 100 different answers based on hue and saturation. Statistics would at least tell us which blue was selected most frequently. We have a similar situation here, as we try to make the distinction between truly "object based" and truly "object oriented" programming. Perhaps the dictionary can settle the issue here. If it's even worth settling.

    YAWN.

  11. #71
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by CornedBee View Post
    makes no sense at all. The basics of OOP is inheritance, if not in actual language syntax, then at least at a conceptual level.
    The basis of OOP is the object, CornedBee. You can obfuscate and throw as much jargon as you want, it does not impress me if you cannot at the same time demonstrate an ability to think properly -- there are tons of over educated people who's minds have been swamped by the material they regurgitate like liturgy. A notice programmer can use objects in (ie) javascript and most OOP capable languages without knowing *anything* about inheritance or polymorphism. They will not be able to do as much, but they will still be using objects.

    Conversely, I very much doubt anyone ever came to a working understanding of polymorphism or inheritance without understanding objects first.

    If you are programming with objects, you are engaged in OOP.

    I am at least glad to see that you understand there is a form of inheritance in js. I have had this same debate elsewhere with an even more ridiculous counter-part of yours who insisted that prototyping was not real inheritance, etc. etc.

    Quote Originally Posted by whiteflags View Post
    as we try to make the distinction between truly "object based" and truly "object oriented" programming. Perhaps the dictionary can settle the issue here. If it's even worth settling.

    YAWN.
    I was hoping we could eliminate this BS before it makes it into the dictionary, but perhaps it is too late -- meaning all people like CornedBee have to do is run to a textbook and quote the "correct" answer.
    Last edited by MK27; 06-12-2009 at 06:11 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  12. #72
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Wasn't there a post very recently asking for a more moderated tone? I admit that saying that your sentence makes no sense is not very nice, and I apologize, but I feel you are far less polite with me than that.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #73
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by MK27 View Post
    Possibly this is a narrow vision of OO derived exclusively from some specific language or languages, because IMO inheritance and polymorphism are non-essential aspects, which are useful, but most of the time do not or should not require any consideration. So if you are saying that inheritance and polymorphism are unnecessary complications, I have to assume you are talking some specific form of OO. Ie, it could be true, but it does not have to be. The thread was not called "Should a new language include some form of dysfunctional OO?"

    AFAIK you do not have know anything about either one to grasp the basics of OOP in most OO languages.
    It was derived from my narrow vision of C++, with respect to C.

    If you want to convince me otherwise, perhaps you should try explaining why OO programming is better than non-OO programming, in terms of previously unattainable potential? But that would be kind of hard, because OO is more about code organization rather than computational ability.

  14. #74
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by CornedBee View Post
    Wasn't there a post very recently asking for a more moderated tone? I admit that saying that your sentence makes no sense is not very nice, and I apologize, but I feel you are far less polite with me than that.
    You're right CornedBee, and I sincerely apologize for implying you are a "regurgitator". If it makes any difference, I was just concerned about your mental health

    In fact you brought a slightly more serious tone to the discussion so thanks.

    Quote Originally Posted by robwhit View Post
    It was derived from my narrow vision of C++, with respect to C.
    I knew it! I knew it!

    Quote Originally Posted by robwhit View Post
    OO is more about code organization rather than computational ability.
    I agree, more or less. I don't know C++, but I use OO in other languages (perl, js, and recently ruby), and the potential for that code reorganization vis. saving a programmer time is Pretty Impressive which is why OOP has flourished. But of course, perl and ruby are written in C! JS implementations are browser specific and probably done in C++. I have been doing some lite net reading about language interpreters today (for another reason) and AFAIK virtually all OO interpreters are written in C. Neat, isn't it?

    ps. I didn't say it was better. But I like it and I do think it should be considered a necessity in a modern language, just like most people would consider functions a necessity. There are a few languages that get away with out them tho, generally because of necessity.
    Last edited by MK27; 06-12-2009 at 06:43 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  15. #75
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by MK27 View Post
    I knew it! I knew it!
    Congratulations. Could you explain how you seem to think that is inadequate?

Page 5 of 6 FirstFirst 123456 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. priority inversion due to pthread_mutex_lock(): how to avoid?
    By mynickmynick in forum C Programming
    Replies: 11
    Last Post: 04-07-2009, 10:34 AM
  2. Why C Matters
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 136
    Last Post: 01-16-2008, 08:09 AM
  3. Data Mapping and Moving Relationships
    By Mario F. in forum Tech Board
    Replies: 7
    Last Post: 12-14-2006, 09:32 AM
  4. recommendation for a good OOP book
    By Mario F. in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2006, 04:28 PM
  5. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21