Slashdot Mirror


Google Releases Version 1.5 of Its Go Programming Language, Finally Ditches C

An anonymous reader writes: Google has launched the sixth notable stable release of its Go programming language Go 1.5. VB reports: "This is not a major release, as denoted by the version number and the fact that the only language change is the lifting of a restriction in the map literal syntax to make them more consistent with slice literals. That said, Go 1.5 does include a significant rewrite: The compiler tool chain has been translated from C to Go. This means "the last vestiges of C code" have been finally removed from the Go code base. As for actual changes in Go 1.5, you'll want to read the full release notes. Highlights include improvements to garbage collection, the developer tools, the standard library, and new ports."

6 of 221 comments (clear)

  1. Re:Oh no.... by Z00L00K · · Score: 5, Interesting

    I agree that it's more like a balloon popping news than revolutionary news. And in any case - there's still C and assembly somewhere.

    When I look at the code examples my opinion is that it reminds me of a mix of C/C++ and Pascal. Not necessarily bad, just an observation.

    What I think lacks when it comes to the Go compiler are the number of platforms supported, some are missing, like ARM and MIPS. Hopefully that will come as well.

    How about translation tools - something that can convert Java to Go?

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  2. Finally! by thegarbz · · Score: 4, Interesting

    It's about time. Wait ... is it? What was so bad about C? Was there an active campaign to eliminate it? Were they behind on some schedule or hanging out against the wider desire to ditch C?

    Why are we finally ditching something that worked?

    1. Re:Finally! by complete+loony · · Score: 5, Interesting

      Builds in Go 1.5 will be slower by a factor of about two. The automatic translation of the compiler and linker from C to Go resulted in unidiomatic Go code that performs poorly compared to well-written Go. Analysis tools and refactoring helped to improve the code, but much remains to be done. Further profiling and optimization will continue in Go 1.6 and future releases. For more details, see these slides and associated video.

      And replacing it with something slower.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    2. Re:Finally! by Anonymous Coward · · Score: 5, Interesting

      They removed C code from the runtime so they had one language to reason about in the garbage collector. It makes updating the pointers on the stack easier among other things: Go 1.5 includes a new moving mostly concurrent garbage collection that wouldn't have been practical with random runtime c code on the call stack. It also makes it easier to contribute to the project (less languages involved), and removed the need for maintaining their modified C compiler that worked with their ABI and stack management.

      So no, none of the reasons they removed C were because C is bad (Though they would also claim it has its issues). It mainly was problematic to have a second and non memory safe language involved in the runtime. The reasons for removing it from the compiler are less clear cut, but some of the same reasons apply.

    3. Re:Finally! by jcr · · Score: 2, Interesting

      Compared to C++, C is a clumsy anachronism. ...and C++ is an appallingly bad attempt to remedy some of C's problems by layering on needless complexity.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
  3. Re:No generics by goose-incarnated · · Score: 2, Interesting

    I can look at a snippet of C code and figure out what it does, but any snippet of C++ code is likely gibberish without looking at numerous macros, class definitions, and documentation for subsets of the language I've never seen before.

    Nonsense. You hate C++ because you don't know it,

    Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger. If you think you know C++ then you're way too dangerous to be on a team. The best C++ devs I've managed were those who openly acknowledged the fact that it is too large and too complicated to be used without sticking to a strict subset of some sort.

    --
    I'm a minority race. Save your vitriol for white people.