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?
Go 1.6 is Released
161–170 of 367 posts
Re: Go 1.6 is Released
#162Earlier 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?
Re: Go 1.6 is Released
#163Earlier quoted context omitted.
Couldn't f check for g's errors?
No because you can't easily pass multiple return values as parameters. So annoying...
Re: Go 1.6 is Released
#164I'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…
Re: Go 1.6 is Released
#165Earlier 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
[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
#166I'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…
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
#167Go 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…
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
#168Earlier 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…
Re: Go 1.6 is Released
#169A 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
#170Earlier 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…