Live data from Hacker News

Go 1.6 is Released

blog.golang.org

161–170 of 367 posts

Re: Go 1.6 is Released

#161
post #20

Earlier quoted context omitted.

The way I see it: 1) Go produces 100% portable code. I absolutely suffered doing the same for a very basic C++ program that used C++11's std::regex. Compiled fine on clang-3.5 on OS X, fails on clang on Linux. It took me hours of searching online to find and install the exact version of GCC that actually fills in std::regex instead of just keeping it empty. Trust me, there are some versions that do that! No errors du…

Go programs can link the Qt library, specifically the GUI components, statically? ... it produces one output binary per target OS?

No it cannot unless you pay for commercial. This is because of Qt licensing last I knew. So ta not totally static but no worse than C++

Re: Go 1.6 is Released

#164

I've been writing some gocode recently and huge chunk of code is if err != nil ... I know you can do if ; err!=nil but that not that much better and you end up in deeply nested if blocks. i have to mentally block out err !=nil to read any gocode linearly. How is this acceptable, I don't get it. https://blog.golang.org/errors-are-values We recently scanned all the open source projects we could find and discovered that…

I agree, it's exactly why I stopped using the language. err != nil checks all over the place gave me a headache. I since moved on to Elixir and it's really great. I just wish that it would allow me to have just a single deployable binary. That's something I really miss about Go.

Re: Go 1.6 is Released

#165

Earlier quoted context omitted.

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

Actually you can: https://play.golang.org/p/a-qhe_vRvo

Oh my god...is that new? I swear I've tried that and it didn't work. You are my new hero.

[edit]

Though maybe I was thinking of adding parameters like https://play.golang.org/p/FKUMlQzCI5

In any case 'thebaer continues to be my hero.

Re: Go 1.6 is Released

#166

I've been writing some gocode recently and huge chunk of code is if err != nil ... I know you can do if ; err!=nil but that not that much better and you end up in deeply nested if blocks. i have to mentally block out err !=nil to read any gocode linearly. How is this acceptable, I don't get it. https://blog.golang.org/errors-are-values We recently scanned all the open source projects we could find and discovered that…

No point in raising an error if you aren't going to do something about it. If you don't care about an error then don't check it. If you do care then handle it.

and you don't need massive if blocks, you can use more early returns as part of the err checks.

Re: Go 1.6 is Released

#167
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…

For (1), I'd highly suggest using 'goimports' (my editor's fmt-on-save uses 'goimports' by default). It will remove and add non-referenced imports as needed. Also, quick prototyping is partially what the underbar (_) notation is meant for in variable assignments. As for (2), I feel it's more of a consequence of programmers not using error types to its advantage. Since Error is an interface it allows for an absurd amo…

Great feedback, thank you.

On (1) Great suggestion, looks good.

On (2) I'm probably biased by having spent a lot of time with Python and Javascript and bound to some preconceived notions of how one should deal with exceptions, so perhaps I give Go a harder time than I should for my failings and not its. :)

On (4) I hope they get it right; packaging can definitely make-or-break the system.

On (3) and (5) I found these techniques could/did-not work when testing Go App Engine. Editing the third party source had no impact, even after restarting App Engine, re-running tests, and deleting the .a files. I'm sure it's just another trick, but I couldn't find it so I eventually just gave up ... hence it being in my list of concerns.

Thanks for the feedback, I appreciate the suggestions.

Cheers

Re: Go 1.6 is Released

#168

Earlier quoted context omitted.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

> The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with > what I would consider the ideal creative process for me as programmer. Java has long been my primary professional language, and over the past few years Go has taken on a strong secondary niche at my job. I'm big fan of both, and tend to play Switzerland in arguments between them. That being said, the best Go…

Can you explain why using a plain text editor for a typesafe language is a bit daft?

Re: Go 1.6 is Released

#169
Can anybody tell me if you can run Go in Chrome using the NaCL stuff? I remember there was talking of it a few years ago but I don't know if anything ever came of it.

A google seach show that you could build for NaCal in Go 1.3 but only run it in special builds not Chrome itself.

Re: Go 1.6 is Released

#170

Earlier quoted context omitted.

Java SE and a fat jar... checks all the boxes and has generics and superior tooling. I still don't get the Go love.

I don't like Oracle. I don't like the JVM. I refuse to learn Java because I personally have a strong bias for native, compiled code. In fact, I really dislike everything about the Java way of programming. The mental image of a huge ram sucking IDE with code completion for frameworks is simply incompatible with what I would consider the ideal creative process for me as programmer. That being said, if I were starting a…

Go is such a simple language that I believe any decent developer could be productive with it within a week. I'm not sure the hiring argument is all that great.
Post reply on HN