Live data from Hacker News

Portable Cloud Programming with Go Cloud

blog.golang.org

11–20 of 158 posts

Re: Portable Cloud Programming with Go Cloud

#11
post #4

Maybe it's a biased and distorted perception that I have, but Go seems to be the most consistent and unsurprising language I've used, and I mean this positively. I haven't written any Go for over a year since my current job mostly uses Node, but I feel immediately comfortable jumping in to the examples in this blog post. I don't think that I'm explaining what I mean very well, but it's something I don't think is so t…

Meh, everyone has a preferred type of language they find least surprising. To many Ruby is the least surprising, and Matz used "principle of [his] least surprise" as a guiding principle when designing it, but many other people find it enigmatic and confusing. Some people find Haskell the least surprising and most consistent, others say Java is. Every language has caveats and inconsistencies, even Go. Like how Go has generics, but only for two or three built-in types. It seems to be more about the person trying out the language than the language itself.

Re: Portable Cloud Programming with Go Cloud

#12
post #3

Why is Google advertising its own product through official golang blog? It looks very amateurish.

How so? Go Cloud works with AWS and soon others. That seems pretty mature to me.

Because it's not a Go project, it's a Google project[1]. It's like Apple posting new iOS features on the Swift blog, e.g.

[1] https://github.com/google/go-cloud

Re: Portable Cloud Programming with Go Cloud

#13
I'm working on a new kind of container that allows for lambdas with very-very low latency. (Suitable for running a game loop.) This is absolutely awesome! Programming against the auto-generated AWS golang APIs is pretty painful. It works, but it's not idiomatic and overly verbose. I'm going to give it a try and see if switching to GCP is that easy.

Re: Portable Cloud Programming with Go Cloud

#14
post #4

Maybe it's a biased and distorted perception that I have, but Go seems to be the most consistent and unsurprising language I've used, and I mean this positively. I haven't written any Go for over a year since my current job mostly uses Node, but I feel immediately comfortable jumping in to the examples in this blog post. I don't think that I'm explaining what I mean very well, but it's something I don't think is so t…

> unsurprising language

---

This is a valid Go program.

    import "fmt";

    func main() {
        fmt.Println("Hello world")
    }
This is an invalid Go program.

    import "fmt";

    func main() {
        // fmt.Println("Hello world")
    }
Surprising.

---

Creating typed general-use data structures is impossible.

Surprising.

Re: Portable Cloud Programming with Go Cloud

#15
post #11
post #4

Maybe it's a biased and distorted perception that I have, but Go seems to be the most consistent and unsurprising language I've used, and I mean this positively. I haven't written any Go for over a year since my current job mostly uses Node, but I feel immediately comfortable jumping in to the examples in this blog post. I don't think that I'm explaining what I mean very well, but it's something I don't think is so t…

Meh, everyone has a preferred type of language they find least surprising. To many Ruby is the least surprising, and Matz used "principle of [his] least surprise" as a guiding principle when designing it, but many other people find it enigmatic and confusing. Some people find Haskell the least surprising and most consistent, others say Java is. Every language has caveats and inconsistencies, even Go. Like how Go has…

The article has two examples of how I already find Go to be inconsistent and/or surprising:

    w, err := b.NewWriter(ctx, "gopher.png", nil)
    ...
    _, err = w.Write(data)
    ...
    if err := w.Close(); err != nil
Why is := used on the first line but = used on the second line, and then := used again on the third line? I get that you use := when introducing a new variable, and = when just assigning, the third line is not really introducing a new variable, since err is still in scope... or is it?

Not to mention, what is the last argument `nil` supposed to represent? In most high quality Node.js libraries, functions/constructors will take an optional options object so you can omit it, or pass an object like { timeout: 300 } to it.

Re: Portable Cloud Programming with Go Cloud

#16
post #4

Maybe it's a biased and distorted perception that I have, but Go seems to be the most consistent and unsurprising language I've used, and I mean this positively. I haven't written any Go for over a year since my current job mostly uses Node, but I feel immediately comfortable jumping in to the examples in this blog post. I don't think that I'm explaining what I mean very well, but it's something I don't think is so t…

> unsurprising language --- This is a valid Go program. import "fmt"; func main() { fmt.Println("Hello world") } This is an invalid Go program. import "fmt"; func main() { // fmt.Println("Hello world") } Surprising. --- Creating typed general-use data structures is impossible. Surprising.

Nope, you have to use imports. It's a little annoying but not "surprising" since the language shoves it in your face right away.

Re: Portable Cloud Programming with Go Cloud

#17

Seems like a very useful library. Any similar libraries for other languages?

Isn’t this just centralizing the cloud provider SDKs? Instead of AWS, GCP, Azure designing their own SDKs, they have a common contract to adhere to. I’d imagine as the cloud becomes more mainstream, you’ll see similar support in Java and .Net (a System.Cloud package for example)

Re: Portable Cloud Programming with Go Cloud

#18
post #4

Maybe it's a biased and distorted perception that I have, but Go seems to be the most consistent and unsurprising language I've used, and I mean this positively. I haven't written any Go for over a year since my current job mostly uses Node, but I feel immediately comfortable jumping in to the examples in this blog post. I don't think that I'm explaining what I mean very well, but it's something I don't think is so t…

For me the big surprise is that we still have languages where we have to write things like

  func setupBucket(ctx context.Context) (*blob.Bucket, error) {
      sess, err := session.NewSession(&aws.Config{
          Region: aws.String("us-east-2"),
      })
full of ( ) { } * and & as if we were still in the 80s. So Go is a very surprising language, but this is highly subjective. No hard feelings.

Re: Portable Cloud Programming with Go Cloud

#19

Earlier quoted context omitted.

> unsurprising language --- This is a valid Go program. import "fmt"; func main() { fmt.Println("Hello world") } This is an invalid Go program. import "fmt"; func main() { // fmt.Println("Hello world") } Surprising. --- Creating typed general-use data structures is impossible. Surprising.

Nope, you have to use imports. It's a little annoying but not "surprising" since the language shoves it in your face right away.

You're correct. I was in no way surprised by this language feature, and neither were any of my coworkers.

Go is a thoroughly "unsurprising" language.

Re: Portable Cloud Programming with Go Cloud

#20

Seems like a very useful library. Any similar libraries for other languages?

Isn’t this just centralizing the cloud provider SDKs? Instead of AWS, GCP, Azure designing their own SDKs, they have a common contract to adhere to. I’d imagine as the cloud becomes more mainstream, you’ll see similar support in Java and .Net (a System.Cloud package for example)

It looks like it, but think of the power. If you write your app for S3 and Amazon raises their prices 100x you can be running on GCP in no time. Of course, you just create interfaces for your data model and implement them with your favorite service, but nobody has time for that.
Post reply on HN