Live data from Hacker News

Go 1.3 beta 1 released

tip.golang.org

51–60 of 131 posts

Re: Go 1.3 beta 1 released

#51
post #12

Random question, why would someone use gccgo over the standard go compiler?

with gccgo you get to take advantage of a lot of gcc's optimizations (-O3) and it can generate faster code because of it.

There is extremely little code in the world that is faster with gccgo. Yes, gccgo can do better with floating point, but the lack of escape analysis slows it down tremendously in every real world situation out there.

http://dave.cheney.net/2013/11/19/benchmarking-go-1-2rc5-vs-...

Re: Go 1.3 beta 1 released

#52

I really wish they'd add string interpolation to Go. After being able to use s"My name is $name and surname is $surname" in Scala and "My name is #{name} and surname is #{surname}" in Ruby I find working with printf a giant step backwards.

I wish they didn't! Magic features like this belong to magic languages like Ruby. Go is not meant to be a magic language.

Go is designed to be a very practical and productive language. It's not quite clear how you're defining "magic" ...

String interpolation is both practical and useful.

Re: Go 1.3 beta 1 released

#53
post #14
post #12

Random question, why would someone use gccgo over the standard go compiler?

One reason is that gccgo supports many architectures that gc does not (SPARC, MIPS, PowerPC, Alpha). It also was the only way to get Go on Solaris until the more recent port of gc to that platform. gccgo is also supposed to produce better code for certain computationally heavy workloads.

> gccgo is also supposed to produce better code for certain computationally heavy workloads.

Unfortunately, this is very seldom true. Gccgo could potentially generate faster floating point code, but its lack of escape analysis grinds it to a halt.

Re: Go 1.3 beta 1 released

#54

If Go is coming to Native Client, then perhaps it will come to Android, too?

An ARM target has been exiting for years, it works just fine on Android. Unfortunately (?) this doesn't allow creating GUI apps or using the Android APIs. Camlistore[1] is written in Go and uses a Go backend on Android, it just has a Java shim for the GUI.

[1] https://camlistore.org/

Re: Go 1.3 beta 1 released

#56

Earlier quoted context omitted.

I wish they didn't! Magic features like this belong to magic languages like Ruby. Go is not meant to be a magic language.

Go is designed to be a very practical and productive language. It's not quite clear how you're defining "magic" ... String interpolation is both practical and useful.

String interpolation is magic because it's not entirely obvious when it happens, what scope rules are followed, if there are any side effects, if the original string is overwritten or whether a new instance is created, what happens when they are used within bodies of loops, what happens when they are used within closures etc., it just works. Sure these can be specified explicitly but they aren't obvious.

It's the kind of feature that is useful when you write an application but not that useful when you're trying to debug it.

Re: Go 1.3 beta 1 released

#57

Earlier quoted context omitted.

Go is designed to be a very practical and productive language. It's not quite clear how you're defining "magic" ... String interpolation is both practical and useful.

String interpolation is magic because it's not entirely obvious when it happens, what scope rules are followed, if there are any side effects, if the original string is overwritten or whether a new instance is created, what happens when they are used within bodies of loops, what happens when they are used within closures etc., it just works. Sure these can be specified explicitly but they aren't obvious. It's the kin…

> It's the kind of feature that is useful when you write an application but not that useful when you're trying to debug it.

It's largely used in log messages and the like where it's used for debugging issues after the fact. I've yet to encounter a case where anyone was ever confused by the behaviour.

Re: Go 1.3 beta 1 released

#58

I really wish they'd add string interpolation to Go. After being able to use s"My name is $name and surname is $surname" in Scala and "My name is #{name} and surname is #{surname}" in Ruby I find working with printf a giant step backwards.

I wish they didn't! Magic features like this belong to magic languages like Ruby. Go is not meant to be a magic language.

There isn't much difference between this:

    "My name is #{name} and surname is #{surname}"
and this:

    "My name is " + name + " and surname is " + surname
or this:

    fmt.Println("My name is %s and surname is %s", name, surname)
Except the first one is much more readable.

String interpolation seems like a small thing, but I find myself wanting to use it all the time. It's definitely not a "magic" feature. Javascript really needs it as well.

Re: Go 1.3 beta 1 released

#59

Earlier quoted context omitted.

String interpolation is magic because it's not entirely obvious when it happens, what scope rules are followed, if there are any side effects, if the original string is overwritten or whether a new instance is created, what happens when they are used within bodies of loops, what happens when they are used within closures etc., it just works. Sure these can be specified explicitly but they aren't obvious. It's the kin…

> It's the kind of feature that is useful when you write an application but not that useful when you're trying to debug it. It's largely used in log messages and the like where it's used for debugging issues after the fact. I've yet to encounter a case where anyone was ever confused by the behaviour.

Right, if this gets in then I officially demand that the much more innocent ternary operator and prefix/postfix increment/decrement operators get in as well.

Re: Go 1.3 beta 1 released

#60
post #31

How are we on IDE's? Last time I tried go (over a year ago) I couldn't really find a nice IDE.

I've been using Light Table with the LightTable-Go plugin (I'm one of the contributors). Support is still fairly basic, but for my needs it works pretty well. If you want to try it, grab the plugin from github and not the ide's plugin manager - that one hasn't been updated in some time.
Post reply on HN