1. 12
  1.  

  2. 10

    The more I look at Go the more I realize how much of a debt they owe to Wirth and Oberon. The way they do methods is identical to how Oberon-2 does type-bound procedures. The basic type system is very similar to that of Oberon, with type embedding very similar to Oberon’s type extension (and inherited by way of Plan 9’s C extensions, which were explicitly called “Oberon-like”). The module system is similar to that of Oberon’s.

    This isn’t to say Go isn’t awesome, just to point out that if you like Go, you might like to read up on Oberon.

    1. 4

      The first writeup on history of it I saw had Pike saying recreating his experience with Oberon-2 was an explicit goal. It’s also why I always say Go could handle OS implementation with some modification since Oberons did.

    2. 2

      Go uses a concept called “automatic interface implementation”… A friend of mine even likes to call it “a statically typed duck typing”

      This is usually called “structural typing”, although that’s actually a somewhat more general concept than what Go does.

      [Goroutines] offer an approach that is similar to the actor model known from languages and frameworks like Erlang and Akka, but I think they give more flexibility

      I wonder what the reasoning is here. Actors are substantially more general than coroutines with FIFO channels.

      A bit off topic, but it’s mentioned in the article and I’m curious: people who go to Go conferences, what interests you about those conferences? To me it seems kind of like going to a conference for Ford Focus owners. If that’s the car you drive, you’re probably not super interested in cutting edge or specialized cars and you just use it to get from Point A to Point B. Go is specifically designed to be uninteresting. So what’s the appeal of a conference about it?

      1. 4

        A bit off topic, but it’s mentioned in the article and I’m curious: people who go to Go conferences, what interests you about those conferences? To me it seems kind of like going to a conference for Ford Focus owners. If that’s the car you drive, you’re probably not super interested in cutting edge or specialized cars and you just use it to get from Point A to Point B. Go is specifically designed to be uninteresting. So what’s the appeal of a conference about it?

        I would guess that people go to network, listen to talks, and learn new techniques and best practices. Heck, hands haven’t changed much in the last few thousand years, but people still go to martial arts conferences too. ;)

        1. 3

          The language could be described as uninteresting. The entire toolchain is pretty exciting for some practical as well as educational reasons.

          So go starts out as “just” a memory safe gc’d C with a runtime supported M:N threading model.

          If that’s where it stopped I’d still use it. It’s not much harder to write than Python, but the multicore story is better and you get the benefits of many errors being caught at compile time like misspellings. Some people claim they never make those sorts of trivial errors.

          I do.

          I’ve done code coverage in Python and Java. I remember setting up ant tasks to post process but byte code to generate reports. Or using my IDE but having trouble sharing that with coworkers. It was never as easy as go test -cover.

          Unit testing has similarly good support. As does benchmarking.

          How about race conditions? go build -race will basically detect any violations of the go memory model. It’s not a perfect tool. Erlang, rust, and Haskell all have arguably better ways of doing this, but it’s still pretty nice.

          How about the FFI story? I’ve used Python ctypes and other dynamic language ffi interfaces. I’ve wrestled with JNI. Cgo is amazing in comparison. It does a credible job of exposing the c type system in go.

          The libraries are awesome. So much better than urllib,urllib2, or even urllib3 (these are all things in Python land). Sadly Python/java just had stdlib built a long time ago. Go has the benefit of hindsight there. The net/http libs and tls libs and networking libs are so good.

          I mentioned that there are also educational reasons. It’s been awesome to watch a production grade compiler evolve. To see a new toolchain arise that’s free from gcc/libc. Even watching the introduction of SSA has been interesting. It feels like go brought back a simple model of development that wasn’t just wrap everything in a new wrapper so it can be re-wrapped when the next thing comes along.

          If go is a boring car, it’s the kind that’s optimized for driving cross country repeatedly, reliably, and safely.

          1. 3

            I agree, the tooling is good, but that’s not very exciting to me (and not very interesting from a research perspective). That’s just the byproduct of google spending millions on tooling, not anything fundamentally interesting or worthwhile about Go.

            Go isn’t particularly safe. It has fewer safety features than even modern Java. Maybe the Focus is the wrong car; If Rust is a 4Runner, Go is maybe an Altima. Null pointers, frequent idiomatic interface casting, questionable error handling semantics, little to no support for formal analysis, not even lightweight analysis via types. Sure, it’s better than C, but that doesn’t make it notably safe or reliable.

            1. 1

              You rattle off a number of criticisms about the language in your 2nd paragraph without backing any of them up. I’m not sure I buy all of them. What’s an example of a way in which Go is more dangerous than Java?

              1. 2

                Perhaps that was a bit harsh; Go and Java offer roughly equivalent memory safety guarantees, but Java offers (mild) safety improvements like (poorly done) optional types, generic stdlib data structures (maybe more of a “bug reduction” than “safety” thing), a less ignore-able exception system, etc. Java isn’t exactly a paragon of safety either; I was just disagreeing with the notion that Go is characterized in particular by safety or reliability.

                1. 1

                  Fair enough. I don’t think Go and Java are that different regarding safety but they are both much safer than c++.

          2. 2

            To be fair “Go is specifically designed to be uninteresting” is the kind of thing that detractors of Go say about it. It’s not like people who actually like and use Go believe that.

            Go’s a language that promotes Hoare’s computing model of Communicating Sequential Processes to a first class part of the language design. That’s pretty interesting to me.

            1. 4

              I don’t think GP meant “uninteresting” in a derogatory way. Pike has basically said as much himself. That being said, I have found Go interesting because it is so unlike anything I’ve used before in a lot of little ways. I’ve had to re-learn how to structure my programs, and that is kind of fun even if I don’t end up loving the language and tooling.

              1. 1

                He didn’t really say that all. He said he wanted to keep the language design clean and simple to reduce cognitive load on programmers and so non-rockstars could use it. That’s pretty different from saying “I wanted to make a boring language”.

                1. 1

                  One person’s “uninteresting” is another person’s “clean and simple”.

              2. 4

                To be fair “Go is specifically designed to be uninteresting” is the kind of thing that detractors of Go say about it. It’s not like people who actually like and use Go believe that.

                I don’t find this all too useful. Sorry for taking the language I currently know best as an example: Rust is (at points) also very uninteresting - it doesn’t invent new language beyond its crucial, innovative concepts (Borrowing/Ownership/lifetimes). Beyond that, it tries to reuse as much as possible.

                There’s also innovation in Go, about its runtime model, the way it repackages old ideas and yes - the way it makes channels and goroutines a core concept of the language.

                What people want to say, probably, is that its a language that manages their innovation budget. How well that is, I don’t want to comment on in a positive or negative way, I just don’t know enough Go for giving an opinion. I know Rust sometimes struggles with it at points, because you cannot escape the innovative stuff.

                Interest is in the eye of the beholder and an uninteresting language is fundamentally something not to use. And I think the amount of people drawn to Go disagrees with that.

                1. 1

                  “Uninteresting” isn’t bad; I was specifically referring to all the stuff Rob Pike said about his motivations whilst designing Go, which basically boil down to “using Go should be easy and unremarkable”.

                  Go also isn’t actually an implementation of CSP. It lacks some features of real CSP, and has some features from e.g. Pi calculus that aren’t in CSP. The design focus wasn’t on satisfying a particular formal model, so citing this as a reason Go is interesting is kind of like saying C is interesting because it promotes the Turing machine model of computation. I guess it’s true, but it’s mostly orthogonal to the language’s design goals and doesn’t really confer any formal or theoretical benefits because the language doesn’t actually follow any interesting theoretical model closely enough to be useful.

                2. 1

                  There is no shortage of JS or Java conferences, which are decidedly unexciting languages. Just saying…

                  1. 2

                    There’s a ton of language development going on in the JS world; there have to be at least 20 experimental languages that all compile to JS, hundreds of complex libraries and language extensions under development, etc. I agree about Java, though. It has sort of the same straightforward industrial nature as Go.

                    1. 3

                      I think your opinions are misguided. Let me give you another perspective that in my mind is about as valid as saying “js is an exploding ecosystem” and “java is straightforward industrial”.

                      Java and the associated jvm brought a pretty fascinating model of computation mainstream. They basically used a smalltalk vm to run a relatively boring language. (Source: https://en.wikipedia.org/wiki/HotSpot#History )

                      Every single class you reference in java possibly came from some remote datasource. Everything can be redefined at runtime, and yet people often don’t pay much of a performance cost because of a world-class JIT. It runs some of the biggest of big data workloads and some pretty small embedded workloads too.

                      And then there’s javascript. A language that someone hoped could piggyback on java’s success by stealing the name. It’s a language so bad that newcomers have to be actively coached away from all the terrible defaults and footguns (alot like C++, except there’s no performance payoff for your pain).

                      Literally the only reason javascript has any success is because HTML authors could paste js (and only js) into a tag to get a popup. Frontend developers didn’t choose js, it was the ultimate (browser) vendor lockin. Js is popular for the exact same reason PHP is popular: You can paste code you got off the internet into HTML docs.

                      There’s a lesson in there somewhere about the benefits of having a nice path of least resistance and the benefits of a monopoly.

                      Or maybe everything I said is b.s. and js and java are both just C++ programs that have gotten kind of popular for making web stuff, and just because js/php devs can operate in the way I said above doesn’t mean they all do.

                      1. 1

                        I never said JS is a good language. I agree it’s horrendous. What I said is that it makes sense to go to a JS conference because people are actually doing cool research with it (for better or for worse). Some of the world’s most advanced functional languages, like Idris and Purescript, target JS.

                        There are, in fact, conferences for JVM research (for the same reason; some cool languages target the JVM), but I was referring to Java, not the JVM.

                3. -4

                  The importance of being able to write generic datatypes?