Live data from Hacker News

Go 1.6 is Released

blog.golang.org

151–160 of 367 posts

Re: Go 1.6 is Released

#151

Earlier quoted context omitted.

> Which means you can declare an interface that foreign packages already conform to, and then freely use them. But you cannot do the reverse: you cannot make a type from a foreign package conform to your interface by adding new methods to it. This is because, with structural typing, it's not safe to add methods to types in other packages, since if packages B and C both were to add a conflicting method Foo to a type f…

> But you cannot do the reverse: you cannot make a type from a foreign package conform to your interface by adding new methods to it. I thought you could. You don't add the methods directly to it, but you can easily embed the foreign type into a new type that confirms to the interface you want. type FooWrapper struct { Foo } func (fw FooWrapper) SomeFunc() { ... }

That's making a new type, which causes a lot of friction. For example, a []Foo array is not castable to a []FooWrapper array without recreating the entire thing.

Re: Go 1.6 is Released

#152
post #74

There was some discussion leading up to the release about whether to merge the "SSA" branch, which seems to be a refactor that allows for easier compile time optimisations but also slows compile times for the time being. Does anyone know if that was included in this release?

The SSA changes are not in Go 1.6. They're expected to be in Go 1.7.

Re: Go 1.6 is Released

#153

Earlier quoted context omitted.

> What Go is lacking at this moment in my opinion is: 1) A comprehensive and mature web framework. Play w/ Scala is my go-to choice now, with Django a very close second. I completely agree here. GIN is my fav framework so far, but it falls down sometimes on documentation and also on features. A lot of features. I know there are three viewpoints with Go. 1) Use net/http and just import libraries. 2) Use a "lightweight…

Have you looked at Revel? https://revel.github.io/

I've looked at all of them. Revel, Beego, Utron, Martini, GoCraft, Echo, Macaron and probably some others I have missed.

I prefer GIN. :)

Re: Go 1.6 is Released

#154

Earlier quoted context omitted.

Java also can't beat Go's concise syntax. Even compared to writing in IntelliJ, an awesome IDE for saving keystrokes, I relish the simplicity and brevity of Go code.

How can Go be concise when you can't do f(g(x)) without two if-statements to check for errors?

Couldn't f check for g's errors?

Re: Go 1.6 is Released

#155

I've really enjoyed the time I've spent with Go but feel like the state of dependency management has kept me away. Am I being stubborn in my longing for an npm, Ruby Gems, or pip? Is there a reason why one of these hasn't emerged/been adopted by the community? (I'm aware of the 1.5 experiment with vendoring.) Semver and pinning versions has always just made sense to me. I can easily adopt new features and fixes autom…

I've never really understood this general complaint about dependencies and go. Maybe it's my work environment? Either: i'm writing something quick and/or as a one-off in which case i just 'go get' anything i need. Or: It's 'full-enterprise' style where each third-party thing that gets used is checked and stored locally. The build is built against these stored versions. If an improvement is made to a 3rd party thing then the changes are reviewed and if suitable that new version is stored locally. If the older go release needs to be rebuilt or investigated it can be rebuilt with the earlier versions by the clean build system. Anything in-between wouldn't get passed QA. but obviously ymmv.

Re: Go 1.6 is Released

#156
post #12

Earlier quoted context omitted.

Go starts very fast compared to jvm. Go compiles into a binary that does not require a jvm to be installed... Go does not require an IDE to develop in... Go is also less verbose

Java doesn't require an IDE either: emacs/Ant/Maven is all I've ever used. Barring specialized platform-specific toolsets (like Android Studio) you don't NEED anything else (you might WANT something else, but that's a separate issue...)

I try to use CLI editors for everything (for me it's vim, but lets not make that a big deal :P), but I have never been successful in doing so with java.

Re: Go 1.6 is Released

#157
post #32

The reason I love Go is that every time I pull it out, I write a small amount of it and it runs beautifully. For example my company has a critical micro-service implemented in ~300 lines of Go, it's been running for six months now without a single hiccup, highly performant, very sexy. The reason I will almost never use Go for web apps is because interaction with databases is limited (almost entirely) to raw queries.…

> The reason I will almost never use Go for web apps is because interaction with databases is limited > but it's a huge drop in efficiency to spin my own SQL. Sorry, I have to disagree. I come from PHP, where when you sneeze an ORM appears. I actually am a DBA also. I am very familiar with SQL and I love writing out raw SQL. I don't see this as a limiting feature. It doesn't affect me at all. There are ORMs for Go as…

I enjoyed using gin at first, but eventually felt the need to rip it out and replace it with mostly the stdlib. :(

My previous job did a PHP -> go transition. I felt like it went well.

Re: Go 1.6 is Released

#158
post #58

Go has a lot going for it. That said, there were a few points I noted, based on a recent go I gave it (pardon the pun), at least in relation to my style of development for this project: 1. It's hard to tinker, mostly because it's fussy about what variables are defined or used. This is a strength in the usual course, but when one is trying to posit what a poorly documented 3rd party API is doing it can be a serious pa…

As zenlikethat points out, "goimports" works around this weakness. For Atom, this package works great [1].

It's so damn arbitrary, though; it refuses to let you have unused imports (which is not a source of bugs) but will happily allow you to shadow variables (which is a serious source of bugs) without even warning you. Super weird.

[1] https://github.com/abiosoft/atom-go-imports

Re: Go 1.6 is Released

#159

Earlier quoted context omitted.

I agree Erlang is probably not the correct fit for the average startup, but for some areas it is essentially unparalleled (and businesses have had great success with it). Consider the online advertising industry, for instance -- in order to guarantee the kind of uptime and debuggability that real-time bidding and decision making on ads requires, Erlang is an excellent choice (cf. https://www.youtube.com/watch?v=qURhX…

Go is great for RTB as well. Easy concurrency that scales very well. Anecdotally it seems a lot easier to hire for than Erlang/functional languages.

If it's just concurrency and scaling, things are a toss-up. Where Erlang really comes into its own are all the fault tolerant and distributed things that Erlang adds, like the supervision tree.

Re: Go 1.6 is Released

#160
post #154

Earlier quoted context omitted.

How can Go be concise when you can't do f(g(x)) without two if-statements to check for errors?

Couldn't f check for g's errors?

No because you can't easily pass multiple return values as parameters. So annoying...
Post reply on HN