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.
  • 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 Offline
      CPalliniC Offline
      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 Offline
        CPalliniC Offline
        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
        • J Jim Crafton

          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 Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #81

          Yeah, and I don't understand that := operator either; I don't know that it is actually useful. I'm still reading the spec and not understanding much of it (parts are difficult to relate to languages I know). It's not object-oriented, but you can write functions in a way that they become methods which seem similar to Extension Methods. Then duck-typing comes in to provide what OO might have provided. I'm not a fan of duck-typing, but that seems interesting. And no Exceptions, but functions can return tuples. Still, the oddest thing so far is the implicit public :confused: -- what if you don't want to start with a Latin character?

          J 1 Reply Last reply
          0
          • P PIEBALDconsult

            Yeah, and I don't understand that := operator either; I don't know that it is actually useful. I'm still reading the spec and not understanding much of it (parts are difficult to relate to languages I know). It's not object-oriented, but you can write functions in a way that they become methods which seem similar to Extension Methods. Then duck-typing comes in to provide what OO might have provided. I'm not a fan of duck-typing, but that seems interesting. And no Exceptions, but functions can return tuples. Still, the oddest thing so far is the implicit public :confused: -- what if you don't want to start with a Latin character?

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

            Yeah, it feels like someone's R&D toy more than anything. The channels and goroutines are admittedly cool, but I can't see how this is something ready to be used other than fooling around with.

            ¡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
            • 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

              A Offline
              A Offline
              AspDotNetDev
              wrote on last edited by
              #83

              Most everyone is right about a lot of stuff. It's the ones that are wrong about a lot of stuff that you gotta watch out for.

              Visual Studio is an excellent GUIIDE.

              1 Reply Last reply
              0
              • J Jim Crafton

                Yeah, it feels like someone's R&D toy more than anything. The channels and goroutines are admittedly cool, but I can't see how this is something ready to be used other than fooling around with.

                ¡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 Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #84

                I finished going through the spec and I think the very strangest part is that (unless I misunderstood) for functions with a variable number of parameters you can't specify the type and you need to use reflection to get the values -- crazy.

                J 1 Reply Last reply
                0
                • P PIEBALDconsult

                  I finished going through the spec and I think the very strangest part is that (unless I misunderstood) for functions with a variable number of parameters you can't specify the type and you need to use reflection to get the values -- crazy.

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

                  Do they have reflection? That would be pretty useful if they did, I'd be shocked to find out this was true though!

                  ¡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
                  • J Jim Crafton

                    Do they have reflection? That would be pretty useful if they did, I'd be shocked to find out this was true though!

                    ¡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 Offline
                    P Offline
                    PIEBALDconsult
                    wrote on last edited by
                    #86

                    Maybe not with a capital-R: " Passing arguments to ... parameters When a function f has a ... parameter, it is always the last formal parameter. Within calls to f, the arguments before the ... are treated normally. After those, an arbitrary number (including zero) of trailing arguments may appear in the call and are bound to the ... parameter. Within f, the ... parameter has static type interface{} (the empty interface). For each call, its dynamic type is a structure whose sequential fields are the trailing arguments of the call. That is, the actual arguments provided for a ... parameter are wrapped into a struct that is passed to the function instead of the actual arguments. Using the reflection interface, f may unpack the elements of the dynamic type to recover the actual arguments. " The spec doesn't go into it further.

                    1 Reply Last reply
                    0
                    • J Jim Crafton

                      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 Offline
                      R Offline
                      Rajesh R Subramanian
                      wrote on last edited by
                      #87

                      Using it in the office is completely out of scope. From all the discussions I've had there, my understanding is that they don't want anything new to come into it for UI. They have valid reasons - as far as their windows UI code is concerned, they have a very large codebase, which is MFC based (some libraries and many components). So, all the new UI should happen with MFC, unless I could prove the need for something different. I've always had a desire to do stuff with VCF (in any of my personal projects), but there's this excuse of not having enough time. But eventually I will do it. :)

                      “Follow your bliss.” – Joseph Campbell

                      J 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

                        R Offline
                        R Offline
                        Rajesh R Subramanian
                        wrote on last edited by
                        #88

                        Nemanja Trifunovic wrote:

                        I proudly used VB6 and everybody was happy with it.

                        I'm tempted to use that as my signature, without providing a link to this post in it. :-\

                        “Follow your bliss.” – Joseph Campbell

                        1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          Using it in the office is completely out of scope. From all the discussions I've had there, my understanding is that they don't want anything new to come into it for UI. They have valid reasons - as far as their windows UI code is concerned, they have a very large codebase, which is MFC based (some libraries and many components). So, all the new UI should happen with MFC, unless I could prove the need for something different. I've always had a desire to do stuff with VCF (in any of my personal projects), but there's this excuse of not having enough time. But eventually I will do it. :)

                          “Follow your bliss.” – Joseph Campbell

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

                          Well I totally understand that. If you ever want some ammunition for using something different just let me know and I can give you some fairly detailed reasons, especially on the Windows platform, as well as some detailed notes on how to partially migrate from MFC to the VCF (unlike Qt, the VCF can be partially integrated into an MFC app so it's not an all or nothing proposition).

                          ¡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
                          • L leppie

                            Nemanja Trifunovic wrote:

                            I like Mark Chu-Carroll's[^] writing style.

                            Me too :) I wonder how long it will take for IronGo to appear? ;P

                            xacc.ide
                            IronScheme - 1.0 RC 1 - out now!
                            ((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition

                            K Offline
                            K Offline
                            Karl Home
                            wrote on last edited by
                            #90

                            Oh goody. Just another way of making the machine do what I say instead of what I want :). The difference, as far as I can tell, is that they've restricted the number of things I can tell it to do.

                            Good advice is always certain to be ignored, but that's no reason not to give it.

                            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