Live data from Hacker News

Go 1.4 is released

blog.golang.org

141–150 of 265 posts

Re: Go 1.4 is released

#141

> The most notable new feature in this release is official support for Android. Using the support in the core and the libraries in the golang.org/x/mobile repository, it is now possible to write simple Android apps using only Go code. This is fantastic! Are there any example Android apps released by the Go team to help get started ?

There has been some work by the community. A user created an app with a button and a webview using go 1.4beta[0]. I modified it to only be a webview with a Go web server[1]. I also wrote an app for myself in the same manner here[2].

I found the whole android developer ecosystem a bit of a pain to setup, but it works now. The amount of java I have to worry about is quite low, so that's a win for me.

---

[0] https://github.com/MarinX/godroid [1] https://github.com/howeyc/godroid [2] https://github.com/howeyc/spipedmobile

Re: Go 1.4 is released

#142

Earlier quoted context omitted.

If they added support for `range 10` to iterate 0-9 this would be useful for doing things a certain number of times. Now it's probably mostly useful for emptying iterators.

Why do they need to add support for this? it already exists... https://github.com/bradfitz/iter/blob/master/iter.go

I don't think that would be considered good Go code. It's no shorter than writing out the 3-part for loop, and it is probably slower.

Re: Go 1.4 is released

#143
post #54

This relatively recent trend of company-specific languages annoys and disturbs me. I don’t ever want to be tied to a language and library ecosystem under the thumb of a single (large) corporation. Not Visual Basic, not .NET, not C#, not Objective C, not Go (It’s even named after the company, for crying out loud! Yes it is. Don’t try to claim otherwise). I’ve used Basic, I’ve used Pascal, I’ve used C, I’ve used Python…

But look at other examples.

JavaScript became ECMAScript, where ECMA is there to define standards, but still there are a couple of big players from certain companies and still they do Dart, which is mostly a Google thing and is a direct competitor to ECMAScript.. well, ECMAScript 6 at least. Even though it's not a bad language one can see a lot of company interest there.

And when you look at Go you see that it is controlled by people who work for Google, but don't exactly depend on them. I think it's more a language of Ken Thompson or Rob Pike than Google.

What do you think about Rust? It's affiliated with Mozilla, but Mozilla is (also) a Foundation and Rust is not a Mozilla Product like Firefox, where it often is really hard to get your changes in. There are a lot of people who got interested, even outside of Mozilla and at least to me it appears that they have influence.

And the last thing is what matters. Microsoft has huge interest on controlling C#, Visual Basic .Net, etc., because their income is related to data. They create the major platform for it, get income via selling the OS, the IDEs, etc.

If you look at Go then that doesn't seem to be the case. Google's main benefit (tell me if I am wrong!) appears to be being able to replace C++ and Python where neither seems to fit for one reason or another. If you look at the state of both the Android version now and Google App Engine then Google doesn't show huge interest into using it for money.

Of course that is only now and maybe this changes, but it doesn't look like it for now.

My personal opinion is that Dart was more to worry, also because of the approach being similar to Microsoft, when they create a standard (be it for documents or a language) and then create their incompatible extension or are always ahead of the others, because of their strong involvement. I really don't see that with Go.

Another thing that is slightly related to go is NaCl (Native Client, not the crypto library), being Google's version of ActiveX. But that's more because it of course is a target platform for Go, not a thing that's wrong with the language. Else you'd also have to worry about C.

Re: Go 1.4 is released

#144
post #130

Earlier quoted context omitted.

Sure, the java bloated ecoystem is a real issue. Yet, imagine yourself building UI component without classes or inheritance ? Can't even say something like "my custom button is a special kind of android button, with just those two methods being overriden". GUI is to me the field where inheritance actually makes a lot of things easier and natural. Now you may end up with something similar using struct inheritance and…

> Can't even say something like "my custom button is a special kind of android button, with just those two methods being overriden". Of course you can do that in Golang. You don't need inheritance. It has composition with type embedding. You can even "override" methods. http://play.golang.org/p/UV55gQj7t0

I know you can, i've explicitly talked about struct inheritance in my comment, as well as manually defining functions for the new type. Yet, this is a weird construct if all you want to do is class inheritance. You have to deal with questions like "do i want to define the func on my type, or on a pointer to that type", or "how do i call "super"", how do i extend the constructor for that new type, etc..

All those questions do have answers in golang. But you have to learn new patterns in order to do an extremely basic and common thing in OOP, once again, without much immediate apparent benefit.

Re: Go 1.4 is released

#145
post #74
post #5

Can someone give me a compelling reason to start programming in Go? My default language at the moment is C, or C++.

It's Go's simplicity that really struck a nerve with me. I've been coding for over 30 years now (Basic, ASM, C/C++, Java, Python, PHP, JS, Clojure) and with Go, I just love how everything is laid out for you: idiomatic Go, formatting, commenting, unit testing, concurrence, standard libraries etc. I don't have to research the basic tools. It keeps me focused on the task at hand. I'm very productive with Go. We have it…

Since you know Python, do you find Gonas expresive an clear as Python? Is there anything like list comprehensions and generators in Go? And anything simple like the Flask web framework? How does it compare to deploying a python app using uwsgi+nginx in terms of performance / reliability?

Re: Go 1.4 is released

#146
post #144

Earlier quoted context omitted.

> Can't even say something like "my custom button is a special kind of android button, with just those two methods being overriden". Of course you can do that in Golang. You don't need inheritance. It has composition with type embedding. You can even "override" methods. http://play.golang.org/p/UV55gQj7t0

I know you can, i've explicitly talked about struct inheritance in my comment, as well as manually defining functions for the new type. Yet, this is a weird construct if all you want to do is class inheritance. You have to deal with questions like "do i want to define the func on my type, or on a pointer to that type", or "how do i call "super"", how do i extend the constructor for that new type, etc.. All those ques…

> i've explicitly talked about struct inheritance in my comment

It's not struct inheritance[1], so I wasn't sure what you were talking about.

[1] - http://golang.org/ref/spec#Struct_types

Re: Go 1.4 is released

#147
post #137

Earlier quoted context omitted.

They are targeting (1) helper libraries compiled natively (2) full screen games compiled natively. Not Dalvik.

So, not a first class citizen on Android then.

It's now exactly as much a second class citizen as C/C++

Re: Go 1.4 is released

#148
post #92

Damn, another project giving up on Mercurial and switching to Git. :-/ A few more major ones and basically nobody is using Mercurial anymore. How sad.

I've favored hg over git for a long time but I gave up that fight a few months back: I mostly use git for all my new code now. I think the DVCS "war" is nearing an end and git pretty clearly won it, for better or worse.

Still, it's great we've had all this DVCS craze in the past years, we ended up with great open source tools that improved a lot over the CVS/SVN of yore.

Re: Go 1.4 is released

#149
post #88
post #82

Earlier quoted context omitted.

I don't really see it - a language made for systems programming (read: non-application development) being used for developing Android apps? Or is there some other kind of Android development in mind, here?

Pretty much any language can be used to program pretty much anything these days. After all, a decade or so ago people would have sniffed at the idea of Javascript running on the server side, Python being used in physics labs and anything other than C++ or Perl for UNIX systems programming (a touch of an exaggeration, but you get my point :)) These days the limitation of a programming language is the programmer him or…

Well, provided a strong implementation of your language exists for the platform/environment you are developing for.

Re: Go 1.4 is released

#150
post #109

Earlier quoted context omitted.

It's too complex, we're already have C++.

I was at a lecture about security in C/++ code a couple of weeks ago. His conclusion was basically: > There are no silver bullets with regards to safety in C/++ code; in order to achieve security, the programmer has to pay the price of being forever vigilant. A lot of the complexity of Rust is for eliminating security pitfalls which are inherent in C/++.

It is common to use ARC and unsafe shared memory access in Rust. This defeats the purpose of this complexity. You can't isolate unsafe memory access. You rather write only memory safe code or end up with fully unsafe codebase where some nasty things (buffer overruns or segfaults) are possible. If somebody needs memory safety - managed languages with GC is the only real option.
Post reply on HN