Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Mark Chu-Carroll on Go (programming language)

Mark Chu-Carroll on Go (programming language)

Scheduled Pinned Locked Moved The Lounge
csharpc++phpcom
90 Posts 18 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Nemanja Trifunovic

    Jim Crafton wrote:

    But I can't inherit behavior, right? Isn't that one of the compelling things about OOP

    Not in my book, except in very specific cases such as GUI libraries. Implementation inheritance is one of the worst ways to reuse code.

    utf8-cpp

    J Offline
    J Offline
    Jim Crafton
    wrote on last edited by
    #61

    Why? Seriously, I don't understand what your issue with it is. I'm not trying to be argumentative, I'd genuinely be curious as to what the issue with it is.

    ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

    N 1 Reply Last reply
    0
    • P PIEBALDconsult

      I'm still trying to figure out what this is in response to. :~

      M Offline
      M Offline
      Member 96
      wrote on last edited by
      #62

      The very old elitist argument against managed development outright regardless of circumstances because performance can be slower in some circumstances than for unmanaged apps.


      "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

      P 1 Reply Last reply
      0
      • Steve EcholsS Steve Echols

        Nemanja Trifunovic wrote:

        Implementation inheritance is one of the worst ways to reuse code.

        That's gotta be one of the craziest things I've heard (today at least). How are you re-using your code?


        - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

        N Offline
        N Offline
        Nemanja Trifunovic
        wrote on last edited by
        #63

        Steve Echols wrote:

        That's gotta be one of the craziest things I've heard

        Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]

        utf8-cpp

        Steve EcholsS J 2 Replies Last reply
        0
        • R Rajesh R Subramanian

          I work for an animation company in their research team. We write software components for 3d rendering, we have a home grown high performance graphics library, our own multicasting library, etc., I'm currently working on a high performance server (MFC for UI and C++ otherwise), and on a thread pool in C. Most of our code works extensively with other applications (other application API) like Maya, Quicktime, etc., Performance is very important here and C#, Java and other things stay outside the gate.

          “Follow your bliss.” – Joseph Campbell

          M Offline
          M Offline
          Member 96
          wrote on last edited by
          #64

          No argument here. :) Though I bet the folks in accounting would be just as happy with their stuff being .net based (actually I *know* they could care less if they're like accounting and business people the world over) ;)


          "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

          1 Reply Last reply
          0
          • J Jim Crafton

            Why? Seriously, I don't understand what your issue with it is. I'm not trying to be argumentative, I'd genuinely be curious as to what the issue with it is.

            ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

            N Offline
            N Offline
            Nemanja Trifunovic
            wrote on last edited by
            #65

            Jim Crafton wrote:

            Why?

            Just answered above with some links :)

            utf8-cpp

            1 Reply Last reply
            0
            • N Nemanja Trifunovic

              Steve Echols wrote:

              That's gotta be one of the craziest things I've heard

              Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]

              utf8-cpp

              Steve EcholsS Offline
              Steve EcholsS Offline
              Steve Echols
              wrote on last edited by
              #66

              So because people have abused it, that makes it evil? In my mind, it's just another tool to get a job done. If something "is-a" I use inheritance. If something "has-a", I use composition. Then there's that huge gray area in between....


              - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

              • S
                50 cups of coffee and you know it's on!
                Code, follow, or get out of the way.
              1 Reply Last reply
              0
              • N Nemanja Trifunovic

                Steve Echols wrote:

                That's gotta be one of the craziest things I've heard

                Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]

                utf8-cpp

                J Offline
                J Offline
                Jim Crafton
                wrote on last edited by
                #67

                Not very compelling arguments except for Herb's, which allow for a lot more leeway. Like anything, you have to learn how to use the tool. I would agree that MI is a PITA, and a language which ditches MI wouldn't bother me in the least. But to *completely* ditch inheritance still seems foolish. It's a tool. It's a good tool in a number of situations. Not all situations, but certainly more than enough to make it useful. The second's links reasoning is a little strange: "It encourages clients to tweak the behavior of base classes in ways that the original developer may not have envisioned. This often requires an intimate knowledge of the base class implementation and means that changes to the base class can easily break the subclass (FragileBaseClassProblem). This is an especially serious problem for component oriented development. " How does inheritance do this? If you don't have the source code to a library's base object, how can you "tweak" it? If the problem is with the design (which is what this really sounds like) then that's not an issue with inheritance per se, but an issue with the fact that whoever developer the library didn't know what they were doing. Two completely different problems.

                ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                1 Reply Last reply
                0
                • M Member 96

                  The very old elitist argument against managed development outright regardless of circumstances because performance can be slower in some circumstances than for unmanaged apps.


                  "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                  P Offline
                  P Offline
                  PIEBALDconsult
                  wrote on last edited by
                  #68

                  Yeah. It really depends on the developer. And as long as performance is "good enough", I'll take maintainability and readability over theoretical top performance.

                  1 Reply Last reply
                  0
                  • R Rajesh R Subramanian

                    That's a very good point you're making. However, I think that you're completely misunderstood here (at least on this thread). I did get you right to some extent though, and the fact with my workplace is that we need to milk out the best performance. I'm not against .NET either (I'm against Java though, such ugly shit should not exist).

                    “Follow your bliss.” – Joseph Campbell

                    M Offline
                    M Offline
                    Member 96
                    wrote on last edited by
                    #69

                    Rajesh R Subramanian wrote:

                    I think that you're completely misunderstood

                    :-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)


                    "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                    J N A 3 Replies Last reply
                    0
                    • M Member 96

                      Interesting. So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.


                      "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                      N Offline
                      N Offline
                      Nemanja Trifunovic
                      wrote on last edited by
                      #70

                      John C wrote:

                      So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.

                      Not sure what your boat is, but the app I work on stays in the background most of the time and needs to be as unintrusive as possible while synchronizing the content over the network. That means - minimal use of CPU, memory and power (for laptops).

                      utf8-cpp

                      M 1 Reply Last reply
                      0
                      • N Nemanja Trifunovic

                        John C wrote:

                        So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.

                        Not sure what your boat is, but the app I work on stays in the background most of the time and needs to be as unintrusive as possible while synchronizing the content over the network. That means - minimal use of CPU, memory and power (for laptops).

                        utf8-cpp

                        M Offline
                        M Offline
                        Member 96
                        wrote on last edited by
                        #71

                        Ahh...I see, that sounds like interesting work.


                        "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                        1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          I work for an animation company in their research team. We write software components for 3d rendering, we have a home grown high performance graphics library, our own multicasting library, etc., I'm currently working on a high performance server (MFC for UI and C++ otherwise), and on a thread pool in C. Most of our code works extensively with other applications (other application API) like Maya, Quicktime, etc., Performance is very important here and C#, Java and other things stay outside the gate.

                          “Follow your bliss.” – Joseph Campbell

                          J Offline
                          J Offline
                          Jim Crafton
                          wrote on last edited by
                          #72

                          Not to kick a dead horse, but if you're just starting this the VCF might be of help for the UI and other parts, as it has both threaded functions, and thread pooling (as well as run loops, and various other thread stuff in it, all completely independent from the UI junk).

                          ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                          R 1 Reply Last reply
                          0
                          • M Member 96

                            Rajesh R Subramanian wrote:

                            I think that you're completely misunderstood

                            :-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)


                            "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                            J Offline
                            J Offline
                            Jim Crafton
                            wrote on last edited by
                            #73

                            I think they are already saying the first three words, so you're well on your way! :)

                            ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                            M 1 Reply Last reply
                            0
                            • M Member 96

                              Rajesh R Subramanian wrote:

                              I think that you're completely misunderstood

                              :-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)


                              "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                              N Offline
                              N Offline
                              Nemanja Trifunovic
                              wrote on last edited by
                              #74

                              John C wrote:

                              Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff"

                              :) My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers. Otherwise, I fully agree that for most real-world software, watching for every single CPU cycle is a waste of time. In fact, when I was developing some accounting sowtware in late 1990s I proudly used VB6 and everybody was happy with it.

                              utf8-cpp

                              M R 2 Replies Last reply
                              0
                              • J Jim Crafton

                                I think they are already saying the first three words, so you're well on your way! :)

                                ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                                M Offline
                                M Offline
                                Member 96
                                wrote on last edited by
                                #75

                                :laugh:


                                "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                                1 Reply Last reply
                                0
                                • N Nemanja Trifunovic

                                  John C wrote:

                                  Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff"

                                  :) My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers. Otherwise, I fully agree that for most real-world software, watching for every single CPU cycle is a waste of time. In fact, when I was developing some accounting sowtware in late 1990s I proudly used VB6 and everybody was happy with it.

                                  utf8-cpp

                                  M Offline
                                  M Offline
                                  Member 96
                                  wrote on last edited by
                                  #76

                                  Nemanja Trifunovic wrote:

                                  My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers.

                                  Yeah I know, it just gets tedious qualifying everything over and over sometimes like I'm writing a license agreement or something. There seem to be a vocal minority in the lounge that are into unusual areas of work and I try to balance that against what I know to be the vast majority that are grinding out bog standard business apps (which you can see from the questions in the forums) and don't post here but lurk a lot.


                                  "Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg

                                  1 Reply Last reply
                                  0
                                  • J Jim Crafton

                                    Normally I'd ignore this, and bitch to myself, but I'm going to try and take the time to respond to this, so I suppose this will end up being a mini-rant. First this smells suspiciously of unix-like laziness. When I start to hear things like "minimalism" and "simple as possible", my bullshit meter starts to go off. Why? Because this is frequently bandied about in regards to *nix type systems as being a feature. In practice what it means (in my experience) is that the developers of said system (or library) want to do as little work as possible in implementing the system, so they make things simple for themselves, which is convenient for them, but usually makes it a total pain in the ass to use or develop with. X-Winblows is a great example of this. It's a lowest common denominator approach that's a total pain to program under and has held back unix GUI's for *decades* (at this point). Other things like this are unix's approach to data (everything's a file!), security, etc. Writing software is hard. Writing *good* software is harder. Implementing details that help the user and/or developer and ensure a certain clarity in the system is a lot of work. But when done properly you end up with great results and powerful tool. Unfortunately people don't like to hear this. Just looking at one of the first examples:

                                    func fib(n) (val int, pos int) {
                                    if n == 0 {
                                    val = 1;
                                    pos = 0;
                                    } else if n == 1 {
                                    val = 1;
                                    pos = 1;
                                    } else {
                                    v1, _ := fib(n-1);
                                    v2,_ := fib(n-2);
                                    val = v1 + v2;
                                    pos = n;
                                    }
                                    return;
                                    }

                                    Huh? I've got "=", "==", *AND* ":="? WTF? First of all "==" is the bane of peoples existence. How many bugs have been caused by the accidental use of this? It's stupid and should be gotten rid of. That leaves us with, apparently (I haven't read the language spec yet, so I'm going on this guys article and one other one I glanced at) two ways to assign values? Grody. Seriously grody. No OO. None whatsoever, despite the "basic object-oriented features" claim. This seems ridiculous. OO is an incredibly useful tool when used correctly. Just because there are a large number of clueless dolts out there who can't be bothered to learn their craft properly and screw things up, doesn't mean you need to drop it from the language. Make it optional. You don't need to force it down peoples throats (like Java does), but you don't need to take it away either. "There's an allocation operator, "new" - but it doesn't initialize values. You can't p

                                    P Offline
                                    P Offline
                                    PIEBALDconsult
                                    wrote on last edited by
                                    #77

                                    Jim Crafton wrote:

                                    but you don't bother to initialize variables, even stuff like ints, etc to 0?

                                    From the spec: " The zero value When memory is allocated to store a value, either through a declaration or make() or new() call, and no explicit initialization is provided, the memory is given a default initialization. Each element of such a value is set to the zero value for its type: false for booleans, 0 for integers, 0.0 for floats, "" for strings, and nil for pointers, functions, interfaces, slices, channels, and maps. This initialization is done recursively, so for instance each element of an array of structs will have its fields zeroed if no value is specified. "

                                    J 1 Reply Last reply
                                    0
                                    • P PIEBALDconsult

                                      Jim Crafton wrote:

                                      but you don't bother to initialize variables, even stuff like ints, etc to 0?

                                      From the spec: " The zero value When memory is allocated to store a value, either through a declaration or make() or new() call, and no explicit initialization is provided, the memory is given a default initialization. Each element of such a value is set to the zero value for its type: false for booleans, 0 for integers, 0.0 for floats, "" for strings, and nil for pointers, functions, interfaces, slices, channels, and maps. This initialization is done recursively, so for instance each element of an array of structs will have its fields zeroed if no value is specified. "

                                      J Offline
                                      J Offline
                                      Jim Crafton
                                      wrote on last edited by
                                      #78

                                      Good. That's a relief to see. What I read in the guys article and the previous one hadn't mentioned that.

                                      ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

                                      P 1 Reply Last reply
                                      0
                                      • S Shelby Robertson

                                        PIEBALDconsult wrote:

                                        I also don't want to forget how to in C

                                        Because sometime you need code that actually, you know, performs well.

                                        Ennis Ray Lynch, Jr. wrote:

                                        Unpaid overtime is slavery.

                                        Trollslayer wrote:

                                        Meetings - where minutes are taken and hours are lost.

                                        CPalliniC Online
                                        CPalliniC Online
                                        CPallini
                                        wrote on last edited by
                                        #79

                                        Shelby Robetson wrote:

                                        PIEBALDconsult wrote: I also don't want to forget how to in C Because sometime you need code that actually, you know, performs well.

                                        FFY.

                                        Shelby Robetson wrote:

                                        PIEBALDconsult wrote: I also don't want to forget how to in C Because sometime you need code that actually, you know, performs well.

                                        FFY (reprise). :-D

                                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                        [My articles]

                                        In testa che avete, signor di Ceprano?

                                        1 Reply Last reply
                                        0
                                        • N Nemanja Trifunovic

                                          I like Mark Chu-Carroll's[^] writing style. A very balanced and knowledgable guy, IMHO. Anyway, here's his opinion on Go[^]

                                          utf8-cpp

                                          CPalliniC Online
                                          CPalliniC Online
                                          CPallini
                                          wrote on last edited by
                                          #80

                                          Good article, thank you for posting the link. :)

                                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                          [My articles]

                                          In testa che avete, signor di Ceprano?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups