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."

9 of 221 comments (clear)

  1. Re:Oh no.... by Anonymous Coward · · Score: 2, Informative

    Yes, the headline is a bit oddly phrased.

    Getting to the self-hosting stage is a major milestone in any programming language.
    Before that it is just a novelty or support language.

    "With version 1.5, the Go toolchain is now self-hosting!" would have been a more descriptive and less flamebaity headline.

  2. Re:No generics by ustolemyname · · Score: 4, Informative

    Underscore is ignore. for loops operate in a key/value fashion, so:

    for key, value := range values
    gives you:
    0, 1
    1, 2
    2, 3
    etc.

    In practice this turns out to be very convenient. You can switch storage between slices and maps without altering your code (both use the same key, value := range x form), and I know that your example above doesn't modify anything stored in values without having to look past the loop declaration.

  3. Re:Sucks they're dividing efforts between Dart &am by bledri · · Score: 4, Informative

    Dart is an awesome language, and we have nearly a million lines of it running both client-side web and server-side. It is a spectacular language. Go is probably better on the server side, but you can't ignore the web. Imagine how much nicer Dart could be if they weren't distracted by Go.

    Google has over 50,000 employees. They can do more than one thing at a time.

    --
    Some privacy policy Slashdot.
  4. Re:And 400 Linus Clones Cried Aloud by Anonymous Coward · · Score: 5, Informative

    Someone isn't an embedded systems programmer. Many many embedded systems use C because its fast, flexible and flipping works.

  5. IOW: Go is now self-hosted by T.E.D. · · Score: 4, Informative

    Having the compiler for a language written in itself is what pretty much every serious compiler is expected to do. Its called being self-hosted, and a compiler is generally not considered very mature until it does this.

    So basically what this is saying is that Go has started to grow up.

  6. Re:Finally! by AmiMoJo · · Score: 1, Informative

    Compiling itself is a major milestone for many languages. C itself passed that point fairly early on, going from being written in BCPL to pure C, at which point a lot of other code started being translated too. It's a good demonstration of the language, as much as anything.

    As for C vs. C++, I think you have it backwards. C is an excellent system programming language and nothing else has managed to supersede it. All major operating systems are written in C, including Linux, the BSD/MacOS kernel and the Windows kernel.

    C++ is a terrible language for most purposes. No good for system programming, and not great for application development. Later languages vastly improve upon it.

    --
    const int one = 65536; (Silvermoon, Texture.cs)
    SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
  7. Re:Can Go still not load shared libraries? by Ian+Lance+Taylor · · Score: 5, Informative

    The Go 1.5 release includes preliminary support for shared libraries. You can now build your Go programs to use shared libraries, on x86_64 GNU/Linux. You can also build shared libraries that can be linked into a C/C++ program, on several platforms.

    Go has had an FFI for calling into C from the beginning: https://golang.org/cmd/cgo .

  8. Re:No generics by serviscope_minor · · Score: 3, Informative

    Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger.

    [citation needed]

    A clue: there is no citation because you're making it up.

    So let's consider languages where actual formal specifications exist because they have to be written in excricuiating detail because the asusmption there is no reference implementation that people can refer to if in doubt.

    Java spec (788 pages, for the language only):

    https://docs.oracle.com/javase...

    C++ spec (425 pages, for the language only):

    http://open-std.org/jtc1/sc22/...

    C# circa 2006 language specification (553 pages for the language only)

    http://www.ecma-international....

    So there you go, definitive proof that there are bigger languages than C++.

    Huh, looks like ADA and Fortran 2008 have longer specs too.

    So there you go, there are 4 standardised languages I've given you which have longer specifications than C++.

    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.

    Given your propensity to simply make shit up about C++ [citation: see above], your statements lack credibility.

    --
    SJW n. One who posts facts.
  9. Re:No generics by goose-incarnated · · Score: 4, Informative

    Neither do you, apparently. C++ (the language, not the library) is the largest programming language in existence. Nothing is larger.

    [citation needed]

    A clue: there is no citation because you're making it up.

    So let's consider languages where actual formal specifications exist because they have to be written in excricuiating detail because the asusmption there is no reference implementation that people can refer to if in doubt.

    [snipped...]

    So there you go, there are 4 standardised languages I've given you which have longer specifications than C++.

    Well Done. Now, where exactly did I claim that the english-language specification for C++ is larger than the english-language specification for other languages? I claimed that the language "C++" is larger, but only a moron would use number of pages of english text as a measurement.

    The C++ language, as defined by its grammar rules in BNF, is larger than any other programming language, as defined by their respective grammar rules in BNF. This is well-known and is taught in almost every introductory compiler class I've reviewed.

    Go ahead - look it up. Here's the BNF rules for java, 48 general rules for the programmer to remember, very few depending on context. Here's the one for C++, 80+ rules for the programmer to remember, many of them depending on context.

    I'm not going to do your homework and search for the grammar rules for the other languages which you claim are bigger than C++; just refuting the one you listed is enough for you to ask yourself "Whats a BNF and why does it determine the size of a language?" If you do not get the relationship between "this is how much language a programmer needs to keep in their head to program" and "this is how large the BNF for the language is" then I'm afraid you are beyond my (and most professional) help.

    (Hint: maybe register for some CS course in programming languages and compiler design? Or write a compiler or two yourself? You would do yourself a favour and learn enough to not use "number of pages in spec" as a measurement of a languages size (and/or complexity, but I didn't even start on that))

    Given your propensity to simply make shit up about C++ [citation: see above], your statements lack credibility.

    Your nerdrage whenever you perceive an attack on "your" language is laudable, however I suggest you stop being so unreasonably attached to what is only a programming language (albeit a very large one). C++ is what it is. Your insults won't change that.

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