Announcement

Collapse
No announcement yet.

Ubuntu's Unity Written In Qt/QML For "Unity Next"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #76
    Originally posted by pingufunkybeat View Post
    There is a very strange trend towards specialisation that is very new. It used to be that all distros offered tweaked KDE and GNOME desktops for the user to choose. Now it seems like each distro wants its own desktop in order to provide a certain kind of experience.

    GNOME is RedHat's private desktop nowadays.
    Unity is Ubuntu's desktop.
    Cinnamon is Mint's desktop.

    You can run them on other distros, but it's clear who does all the development and decides the direction.
    Wrong. Ubuntu still uses gnome, it's just by creating gnome-shell gnome developers let canonical create their own shell not whole DE. Cinamon is same gnome. Please just because it has different name it doesn't mean it absolutely new thing...

    Comment


    • #77
      Originally posted by JS987 View Post
      GObject is retarded emulation of OOP.
      I have never tried GObjects. But how do I identity real OOP. It is possible to create something like OOP in pure c. Many c project do that. Is that real OOP?

      Comment


      • #78
        Originally posted by Akka View Post
        I have never tried GObjects. But how do I identity real OOP. It is possible to create something like OOP in pure c. Many c project do that. Is that real OOP?
        Well there is no real or fake to OOP, OOP is simply the recognition that language is based upon objects and applying that to programming. That said languages can be either more or less accommodating to standard OOP design principles, which plain C isn't very accommodating for, although it is well worth noting that C++ (which is accommodating) was originally just a bunch of macros on top of C.

        Comment


        • #79
          Originally posted by Akka View Post
          I have never tried GObjects. But how do I identity real OOP. It is possible to create something like OOP in pure c. Many c project do that. Is that real OOP?
          Real OOP languages have keyword class or some equivalent. You can't do real OOP with C as it supports only structure which isn't class.

          Comment


          • #80
            Originally posted by JS987 View Post
            Real OOP languages have keyword class or some equivalent. You can't do real OOP with C as it supports only structure which isn't class.
            Oh really.

            So prototype-based languages, like Javascript or Lua, aren't actually "real OOP"?

            Comment


            • #81
              Originally posted by dee. View Post
              Oh really.
              So prototype-based languages, like Javascript or Lua, aren't actually "real OOP"?
              They have equivalent.

              Comment


              • #82
                Originally posted by JS987 View Post
                They have equivalent.
                Which is the essential feature you don't have in C which prevent real OOP . Classes is only a name on a solution. What is the essential feature C lack?

                Comment


                • #83
                  Originally posted by Akka View Post
                  Which is the essential feature you don't have in C which prevent real OOP . Classes is only a name on a solution. What is the essential feature C lack?
                  I already said which features C is missing.
                  You can read docs about classes
                  http://www.cplusplus.com/doc/tutorial/classes/
                  http://en.wikipedia.org/wiki/Class_(...r_programming)

                  Comment


                  • #84
                    Originally posted by JS987 View Post
                    I already said which features C is missing.
                    You can read docs about classes
                    http://www.cplusplus.com/doc/tutorial/classes/
                    http://en.wikipedia.org/wiki/Class_(...r_programming)
                    OOP has actually very little to do with the "class" keyword. That's just a convenience. You can build powerful object oriented systems in C using function pointers. To harness OOP you basically just need to be able to implement polymorphism, which you can do in C using function pointers. The syntax isn't as pretty but it works.

                    Similarly just because you're writing code using the "class" keyword doesn't mean you're writing an object oriented program. Many programs use "classes" as just modules to group related code not to create real objects.

                    Comment


                    • #85
                      Originally posted by admax88 View Post
                      OOP has actually very little to do with the "class" keyword. That's just a convenience. You can build powerful object oriented systems in C using function pointers. To harness OOP you basically just need to be able to implement polymorphism, which you can do in C using function pointers. The syntax isn't as pretty but it works.
                      Similarly just because you're writing code using the "class" keyword doesn't mean you're writing an object oriented program. Many programs use "classes" as just modules to group related code not to create real objects.
                      Function pointer isn't same as method. You can't do real OOP without methods.
                      C++ supports also functional programming. It's your decision if you use OOP or not.

                      Comment


                      • #86
                        Originally posted by JS987 View Post
                        Function pointer isn't same as method. You can't do real OOP without methods.
                        C++ supports also functional programming. It's your decision if you use OOP or not.
                        A method is nothing but a function that gets passed an object reference, sometimes implicitly (as in C#, Java), sometimes explicitly (as in Python).

                        There's no reason you can't create functions and pass references (pointers) to them as parameters in C.

                        GObject is an object-oriented type system, written entirely in C. It's a C library. Then there's Vala, which is similar in syntax to C#, supports all the OOP features from C#, and it compiles to C + GObject code. You can try it yourself. Go on, write whatever small program with what you consider OOP, in Vala. Then compile it and look at the resulting C code. There's the same OOP code, but on a lower level, with all the abstractions showing as raw code.

                        Comment


                        • #87
                          Originally posted by JS987 View Post
                          They have equivalent.
                          And no, no they haven't. Look up what prototype-based OOP is about. There's no classes, instead objects are made by cloning other objects (you create an object "prototype" that other objects are based on, hence the name). So no, classes are not necessary for OOP, they're just abstractions, a way of saying "this object creates other objects". Prototype-based OOP does away with the distinction between classes and objects, there's just objects that can make copies of themselves and those copies can be extended.

                          Comment


                          • #88
                            Originally posted by dee. View Post
                            A method is nothing but a function that gets passed an object reference, sometimes implicitly (as in C#, Java), sometimes explicitly (as in Python).
                            There's no reason you can't create functions and pass references (pointers) to them as parameters in C.
                            GObject is an object-oriented type system, written entirely in C. It's a C library. Then there's Vala, which is similar in syntax to C#, supports all the OOP features from C#, and it compiles to C + GObject code. You can try it yourself. Go on, write whatever small program with what you consider OOP, in Vala. Then compile it and look at the resulting C code. There's the same OOP code, but on a lower level, with all the abstractions showing as raw code.
                            C++ method is different from C function. Method is part of class namespace, but function is declared in global namespace.
                            In real OOP data are private and you have to use methods to access data. Direct access to private data in structure passed as reference isn't possible.
                            Vala compiler converts OO code to non-OO code. C code is never real OO code.

                            Comment


                            • #89
                              Originally posted by dee. View Post
                              And no, no they haven't. Look up what prototype-based OOP is about. There's no classes, instead objects are made by cloning other objects (you create an object "prototype" that other objects are based on, hence the name). So no, classes are not necessary for OOP, they're just abstractions, a way of saying "this object creates other objects". Prototype-based OOP does away with the distinction between classes and objects, there's just objects that can make copies of themselves and those copies can be extended.
                              They have dynamic/anonymous classes.

                              Comment


                              • #90
                                Originally posted by JS987 View Post
                                C++ method is different from C function. Method is part of class namespace, but function is declared in global namespace.
                                In real OOP data are private and you have to use methods to access data. Direct access to private data in structure passed as reference isn't possible.
                                Vala compiler converts OO code to non-OO code. C code is never real OO code.
                                Encapsulation? You can do it, the compiler don't help you obviously. But you can do it in c? Dee. has already said how. Structs with data and with functions with pointers to operate on the data and you have a simple solution.

                                I do not now any practical easy way to get inheritance (I'm sure you can do it?) but I don't think that is a requirement for OOP. I'm sure most of the basic OOP patterns is older than the OOP languages.
                                Last edited by Akka; 03-11-2013, 03:56 PM.

                                Comment

                                Working...
                                X