News for hackers. Stuff that matters.
Re:Why Go and Not Rust? by darklion on Monday September 16, 2019 @10:19AM (#20984245)
> Go is a better Java / C#, while Rust is not.

Mm, not really. Go is a less sophisticated Java / C#, in the same way that a bicycle is a less sophisticated motorcycle. There's situations to use both, and there's nothing with either, but sometimes you want or need to travel hundreds of kilometers in a day and a bicycle isn't going to cut that for most people.

Re:Why Go and Not Rust? by DocSavage on Monday September 16, 2019 @10:39AM (#20984495)
I hate bad analogies that have us arguing more about how well the analogy fits than simply debating the underlying question. When we talk about concurrency or the ability to make simple yet high-performing server apps, it's ridiculous to say Go is a bicycle compared to the motorcycle that is Java / C#.

User-space network driver? The benchmarks group Go closer to Rust with Java / C# way behind: https://github.com/ixy-languages/ixy-languages

This would be a very complex comparison and simple analogies do us a disservice. I think the author's blanket statement that Go is faster than Java / C# also seems too broad.

Re:Why Go and Not Rust? by saghm on Monday September 16, 2019 @02:17PM (#20986989)
> User-space network driver? The benchmarks group Go closer to Rust with Java / C# way behind

That's a very generous reading of those benchmarks. What you said is true in the latency benchmarks, but in the throughput benchmarks, C# _beats_ Go at high packet rates and is much closer to Go than Go is to Rust at low to medium packet rates.

Re:Why Go and Not Rust? by loonyphoenix on Monday September 16, 2019 @11:14AM (#20984877)
How do you get that C# is way behind Go on this one? If anything, those benchmarks show these groups of languages performing at roughly the same level:

1. C/Rust

2. Go/C#

3. Java/OCaml/Haskell

4. JavaScript/Swift

5. Python

Re:Why Go and Not Rust? by DocSavage on Monday September 16, 2019 @11:31AM (#20985055)
I agree that my wording is too strong due to my memory of the latency results. As you increase the load, Go is closer to Rust/C than C# (see last benchmarks) and at a given load, C# isn’t in picture. It’s fair to say that Go/C# is similar while Java is far behind depending on the benchmarks that are important to you.
Re:Why Go and Not Rust? by joelfolksy on Monday September 16, 2019 @06:09PM (#20989044)
> and at a given load, C# isn’t in picture

And depending on how you draw the picture, Go might not even be in the bandwidth picture.

Re:Why Go and Not Rust? by wffurr on Monday September 16, 2019 @01:37PM (#20986586)
The analogy is better than you intended. It's a lot easier to kill or injure yourself with a motorcycle than a bicycle, too.

The Java/C# vs Go equivalent being causing your project to run overbudget and a be a trainwreck of bugs due to overengineering and runaway complexity.

Re:Why Go and Not Rust? by apta on Tuesday September 17, 2019 @09:25AM (#20994758)
golang has nothing to offer compared to Java's introspection capability, performance, tooling, tunability, and even concurrency (see java.util.concurrent). Not to mention maturity and widespread adoption.

It's just an overhyped, subpar language.

Re:Why Go and Not Rust? by hactually on Wednesday September 18, 2019 @01:16AM (#21002545)
Concise, clean, effective and without cruft. That's the main reason for Golangs unstoppable growth.

Java is a language and computing platform from the 90s and it shows. It really needs to just stop and the mess around licensing only serves to help kill it.

I also wouldn't tout the concurrency of Java over Golang - having the concurrency model baked into the language and runtime means a clear advantage for Go and one which simplifies the communication among different agents.

Please learn some basics.

Re:Why Go and Not Rust? by apta on Wednesday September 18, 2019 @03:16PM (#21008913)
I have used both in production, and Java/JVM is far superior.

Concise is not a word I'd use to describe golang. I can't count how many times I've come across code that would be 1 or 2 lines in Java compared to 15 lines or more in golang. It's quite ironic given the unsubstantiated claims around golang. Lots cruft with "if err != nil" littered everywhere is barely scratching the surface.

Java is getting a green thread implementation by means of project Loom. However, the JVM already handles very high concurrency systems in production by using libraries like Akka, Vertx, and Reactor. It is already used by major corporations to handle extremely high load systems. It's already proven itself over decades.

I don't know what you mean by Java being a computing platform from the 90s. If anything, golang is at a similar level as Java when it was first released (no generics), except worse (error prone error handling, poor design of interfaces, and many bad and unsubstantiated design decisions). Not to mention the JVM having state of the art GC, as well as performing optimizations way beyond what golang is capable of.

OpenJDK is fully open source, no licensing there. Not only that, but Oracle has open sourced previously closed source projects pertaining to the JVM and tooling around it.

The main reason for golang is the hype behind it. Proof is that some of the same authors worked on its predecessor a long time ago, and nothing ever came out of it because they didn't have the Google brand behind them. People today follow hype without substantiation.

Re:Why Go and Not Rust? by hactually on Thursday September 19, 2019 @03:25AM (#21014081)
You're arguing a lot of abstract points here but let's have a walkthrough...

> I have used both in production

likewise, and I have found the opposite stance for Java/JVM based applications.

Terrible deployment story, terrible amount of tweaking and JVM "hacks".

> Java is getting a green thread implementation by means of project Loom

Well done to Java. It's getting features already commonplace in Golang. Bolting on Akka, Vertx... yeah, enjoy your frankensteins monster lol.

> no generics

Generics _arent_ critical for a language, exceptions are a mess and as for the JVM being state of the art... yeah. In the 90s it was.

> The main reason for golang is the hype behind it

I just fundamentally disagree - if that was truly the case, I'd have adopted Java back when it was hyped and relevant and would've moved onto Rust by now from Golang which never happened.

Re:Why Go and Not Rust? by apta on Thursday September 19, 2019 @10:30AM (#21016523)
> Terrible deployment story, terrible amount of tweaking and JVM "hacks".

A lot of people these days are building fat/uber jars. All it takes to run your code is `java -jar foo.jar`. Can't get much simpler than that.

Tweaking is a plus that golang doesn't offer. The JVM runs an extremely wide range of workloads, and gives you the ability to tune it accordingly, e.g. whether you care more about throughput vs latency. Compared to golang where this is extremely limited.

It's not surprising that a huge number of data processing workloads run on the JVM (regardless of implementation language).

> Bolting on Akka, Vertx... yeah, enjoy your frankensteins monster lol.

That's not an argument. These frameworks are mature and battle tested, not to mention built on sound principles (e.g. Akka is similar to Erlang's actor model, which includes supervisor capability and remoting - nothing like this exists in golang).

> Generics _arent_ critical for a language, exceptions are a mess

They're not critical in the same way "functions/procedures" are not critical, but you're going to end up with a messy code base when it comes to reality. Again, the number of times I've seen what amounts to map/filter calls littering the code base, making it more difficult to read (not to mention error prone) is too many to count. Generics fix this. Funnily enough, it's golang that chose to disregard best practices from the 70s.

> and as for the JVM being state of the art... yeah. In the 90s it was.

Tell that to Google, FB, Apple, Amazon, and many more who run their critical infrastructure on the JVM. The introspection and monitoring it provides is literally second to none, not to mention performance, tunability, hot-swapping, rich ecosystem, and many more.

> I just fundamentally disagree

You can, but the fact remains that some of the same authors worked on a golang predecessor which never went anywhere, precisely because it didn't have the Google name behind it.

Re:Why Go and Not Rust? by mirceal on Monday September 16, 2019 @10:32AM (#20984397)
but but... anybody can ride a bike and you don’t need to pay for gas. and it’s better for the environment. think about the new people joining the team.