News for hackers. Stuff that matters.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by 0815test on Monday May 27, 2019 @12:37PM (#20023348)
> ...but no one would have adopted it if it weren't.

It's a C-like language with GC, that compiles to native code supported by an efficient runtime, and can work effectively with parallel/concurrent code. In many ways it's Java done right, or a more intuitive (and from certain POVs, preferable) alternative to Haskell and Ocaml. That would seem to be enough to drive adoption.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by kd0amg on Monday May 27, 2019 @12:44PM (#20023415)
Go shot past similar languages because Google's backing got lots of instant attention from people who would never even hear of something like Nim or Clay.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by apta on Monday May 27, 2019 @03:07PM (#20024521)
> In many ways it's Java done right

Not quite:

* no generics

* error prone error handling

* non tunable GC

* null pointers

* golang interfaces are messy and can't be used to tag structures

* golang time package is garbage

and lots more

Java today is superior to golang in almost every front.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by grumpydba on Monday May 27, 2019 @04:52PM (#20025166)
Memory usage, compile time, simplicity, readability and deployment story are notable fronts in which go is several miles ahead.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by apta on Monday May 27, 2019 @07:56PM (#20026122)
Java will use however much memory is assigned to it, since it defaults to throughput performance (though now with G1 and Shenandoah that can also be tuned)[1].

Compilation times are not that different, especially when using incremental compilation. I worked on large projects in both languages, and for any non-trivial code base, the difference isn't that far off.

I'd argue that readability is better in Java due to things like non-clutter due to error handling, and the existence of generics.

Deployment has been solved for a while now with building shadow jars[1].

[1] Not to mention offerings like: https://quarkus.io/

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by grumpydba on Tuesday May 28, 2019 @01:08AM (#20027370)
You mention a lot of workarounds and knobs though. And the excessive use of layers of abstractions in the Java world is scary.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by apta on Tuesday May 28, 2019 @03:49PM (#20033664)
Large projects are complex. The JVM is designed to be a platform for developing general purpose software, which is why it provides options for tuning and whatnot. golang only comes with a low latency GC, which basically means you cannot use golang if you're looking for high throughput.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by grumpydba on Wednesday May 29, 2019 @08:35AM (#20039327)
> golang only comes with a low latency GC, which basically means you cannot use golang if you're looking for high throughput.

I you're looking for high throughput you just need to allocate less. Or use unsafe. And it's totally doable.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by apta on Wednesday May 29, 2019 @11:12AM (#20041107)
So you "only" have to make significant, error prone (by using unsafe) code changes as opposed to tuning a couple of parameters for the GC to account for a different workload? Again, this shows the superiority of the JVM here.

And the same approaches can be done in Java (e.g. self-managed off heap allocations), even more-so when they introduce value types.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by grumpydba on Wednesday May 29, 2019 @03:14PM (#20044176)
Object pools are really easy. Unsafe is only for extreme cases. Some cache libraries use it. You don't have to code it yourself. Yes this is better than relying on the end user/admin to tune things. It is more predictable.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by apta on Wednesday May 29, 2019 @11:45PM (#20048186)
Managing allocations is way more than just object pooling. The following code in golang allocates "n" on the heap:

    func main() {
        n := 1
        fmt.Println(n)
    }
Object pooling won't help here.

The new GCs on the JVM have very few parameters to tune, I think Shenandoah or ZGC have only two parameters to set up, can't get much simpler.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by grumpydba on Friday May 31, 2019 @06:30AM (#20059668)
You can pool n if it's on your hot path, can't you?

Escape analysis was just rewritten, and the objective is to handle this case more gracefully.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by mattnewton on Monday May 27, 2019 @02:28PM (#20024226)
I don’t understand the comparison to Haskell or Ocaml; those languages are not C like and have a much different philosophy on the responsibilities of the language and type system.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by 0815test on Monday May 27, 2019 @02:31PM (#20024251)
Haskell is not C like? You can write Haskell with curly brackets and semicolons, just like Go! I rest my case.

No, but seriously, you didn't get what I was saying there. The whole reason Go might be of interest is that it is loosely C-like in a way that Haskell and Ocaml are not.

Re:Ian Lance Taylor's Response to “Go Is Google's Language” by mattnewton on Monday May 27, 2019 @08:25PM (#20026235)
That true, and I still don’t get what you are saying here. In my mind, they are different languages which appeal to different developers and fit with different requirements. I don’t see it as an alternative to Haskell any more than any Turing-complete language is technically an alternative.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by yjftsjthsd-h on Monday May 27, 2019 @01:04PM (#20023573)
Then why did D never take off?
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by nonsense1234 on Monday May 27, 2019 @01:37PM (#20023859)
For a long time D wasn't open source, didn't work very well on Windows, had a very limited standard library, and had poor IDE support. There's also a large divide in the community around garbage collection vs manual memory management.
Re:Ian Lance Taylor's Response to “Go Is Google's Language” by simias on Monday May 27, 2019 @01:45PM (#20023922)
I don't necessarily agree with the parent's point but D managed to fumble early on and never managed to catch up ever since. Around the time it got released (in the early 2000's) I was a C++ coder and I remember being very interested, only to immediately dismiss it as soon as I learned that it wasn't fully open source. I'm sure other devs didn't mind as much as I did but it definitely stunted growth early on. By the time they fixed this "issue" there was a lot of competition in that space and I never bothered looking back.