Live data from Hacker News

Go 1.4 is released

blog.golang.org

81–90 of 265 posts

Re: Go 1.4 is released

#81
post #73

There is a new range syntax[1]. The release notes say it's rarely used, but makes code cleaner. In which cases would the syntax be useful? [1] https://golang.org/doc/go1.4#forrange

[deleted]

Re: Go 1.4 is released

#82

> 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 ?

And now things just got interesting. I'll put my money on the availability of Go on Android being the catalyst for its future hockey stick growth.

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?

Re: Go 1.4 is released

#83
post #73

There is a new range syntax[1]. The release notes say it's rarely used, but makes code cleaner. In which cases would the syntax be useful? [1] https://golang.org/doc/go1.4#forrange

One use case would be to exhaust a channel (that is, read everything off it until it is closed). Another might be to loop over something of a fixed size to correlate with a corresponding number of other things.

Re: Go 1.4 is released

#84
post #73

There is a new range syntax[1]. The release notes say it's rarely used, but makes code cleaner. In which cases would the syntax be useful? [1] https://golang.org/doc/go1.4#forrange

Here's a search of the go source for use of that: https://github.com/golang/go/search?p=3&q=%22for+range%22&ty...

Most of them are tests, but I see a couple genuine use cases:

1. Draining a channel until it closes.

2. Since range of a string gives utf8 runes, the RuneCountInString function in the utf8 package simply has an integer count, and does a range through the string increasing the count in every loop.

Re: Go 1.4 is released

#85

> 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 ?

And now things just got interesting. I'll put my money on the availability of Go on Android being the catalyst for its future hockey stick growth.

I would be extremely surprised to see a language having no class, no inheritance and no good IDE become successfull in modern app development. Android devs are used to such a different type of programming, i don't expect them to accept banging their heads on so many walls for such little gains.

Ps : my stand is the opposite for server side dev.

Re: Go 1.4 is released

#86
post #76
post #3

Earlier quoted context omitted.

https://github.com/golang/mobile/tree/master/example

As far as I can tell these samples are immediately bailing out of the Java framework and calling Go using JNI. Which means you don't get the niceties of the UI Framework. You could make OpenGL calls from the Go code like for a game or something. Maybe someone will come up with a Go game engine for Android.

[deleted]

Re: Go 1.4 is released

#88
post #82

Earlier quoted context omitted.

And now things just got interesting. I'll put my money on the availability of Go on Android being the catalyst for its future hockey stick growth.

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 herself.

Re: Go 1.4 is released

#89
post #5

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

If you're using C/C++ and need the performance, look at Rust. Fairly expressive, good type system (and they figured out generics), and C++ like or better performance. All the power of manual memory control, with none of the downsides.

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

Re: Go 1.4 is released

#90
post #72
post #61

Nice. Now all I need is for someone to turn https://github.com/jcla1/gisp into a slightly more complete LISP and I'll have a nice environment for all kinds of ARM systems. Edit: typo/autocorrect

this your project? i'm down to do this

Nope, just something I've been keeping track of. Needs macro support, for starters, and this fork (https://github.com/masukomi/gisp) is adding tests.
Post reply on HN