News for hackers. Stuff that matters.
Re:Go runtime: 4 years later by qaq on Monday September 26, 2022 @09:00PM (#32990550)
Async code is way nicer in Go than it is in Rust. It makes up for a lot for me when writing web services. Also Go is much easier to read vs Rust.
Re:Go runtime: 4 years later by masklinn on Tuesday September 27, 2022 @03:33AM (#32992477)
> Async code is way nicer in Go than it is in Rust.

That’s because Go does not have async code. It has sync code on an async runtime. Like e.g. Erlang/Elixir.

Re:Go runtime: 4 years later by qaq on Tuesday September 27, 2022 @05:46AM (#32993303)
Exactly don't have to deal with red/blue functions
Re:Go runtime: 4 years later by throwaway2037 on Tuesday September 27, 2022 @04:54AM (#32992985)
This is an interesting comment. Is there a webpage where I can read more about this idea?
Re:Go runtime: 4 years later by sph on Tuesday September 27, 2022 @06:40AM (#32993603)
Re:Go runtime: 4 years later by throwaway2037 on Wednesday September 28, 2022 @09:26AM (#33007616)
That guy is a lengendary blogger! And I have read that post. It was very eye opening. I always struggle when I write an (internal) API that has sync (blocking) and async (non-blocking) sections and methods. It quickly becomes very difficult to reason about!
Re:Go runtime: 4 years later by Klonoar on Monday September 26, 2022 @09:58PM (#32990854)
>Also Go is much easier to read vs Rust.

This is subjective - I for example have no real issues reading Rust code, but find Go to look like utter spaghetti on the screen.

Re:Go runtime: 4 years later by Tozen on Tuesday September 27, 2022 @03:48PM (#33000235)
I have to side with those saying Go has greater readability, and is easier to use and learn. I know there is a strong push (and arguably corporate backed) to put Rust in everybody faces or present it as being superior, but we still need to be realistic and honest. Not saying that Rust doesn't have its places where it can shine, just that a lot of people are going to find Go to be easier to deal with overall, and it was partially designed to be that way.
Re:Go runtime: 4 years later by Klonoar on Wednesday October 05, 2022 @03:20AM (#33092305)
>I know there is a strong push (and arguably corporate backed) to put Rust in everybody faces or present it as being superior

No part of my comment was doing this, and this bit is entirely unnecessary and adds nothing to the comment you wrote except fan religious wars about languages.

Re:Go runtime: 4 years later by qaq on Tuesday September 27, 2022 @05:54AM (#32993361)
Sure. But just due to Go type system being pretty basic I've never came across Go code I could not immediately grock, not so with Rust. Even bugging some pretty savvy Rust devs for help it sometimes took them a decent amount of time to pin down whats going on.
Re:Go runtime: 4 years later by baby on Tuesday September 27, 2022 @03:37AM (#32992501)
That’s probably because you’re not used to it. I think it’s common knowledge that Golang is easy to read.
Re:Go runtime: 4 years later by lsaferite on Tuesday September 27, 2022 @11:18AM (#32996446)
Couldn't the same be said of rust though? The biggest barrier, in my experience, is almost always familiarity with the syntax.
Re:Go runtime: 4 years later by baby on Wednesday September 28, 2022 @12:55AM (#33004376)
I work mostly with Rust, and have been for years, and no I wouldn't say that Rust is easy to read. It's easier to read than most legacy languages, but it's nothing like Golang.
Re:Go runtime: 4 years later by Klonoar on Tuesday September 27, 2022 @03:34PM (#33000024)
Pretty much this, yes.

I think my comfort with Rust moreso comes from it feeling like any other C-ish language in appearance. It reads as expected to me.

Re:Go runtime: 4 years later by kaba0 on Tuesday September 27, 2022 @01:55AM (#32991934)
And much more error prone.
Re:Go runtime: 4 years later by fnord123 on Tuesday September 27, 2022 @03:51AM (#32992614)
Depends where someone comes from. If they are from a weakly or dynamically typed language (C, python, Javascript) then Go is quite ok. If you're coming from Haskell, OCaml, or Rust, then sure Go might be frightening.
Re:Go runtime: 4 years later by peaky_blinder on Tuesday September 27, 2022 @06:15AM (#32993475)
They're all weakly typed languages but C is statically typed.
Re:Go runtime: 4 years later by simiones on Tuesday September 27, 2022 @06:43AM (#32993627)
Python is generally considered quite strongly typed, though dynamic. That is because Python has relatively few implicit conversions, and especially few that are surprising ("1" + 1 is an error, not 2 or "11"; and unsigned short + unsigned short does not equal a signed int).
Re:Go runtime: 4 years later by kaba0 on Tuesday September 27, 2022 @06:22AM (#32993513)
I think parent didn't say anything to the contrary, or maybe it was edited?
Re:Go runtime: 4 years later by fnord123 on Tuesday September 27, 2022 @07:16AM (#32993841)
First iteration was didn't include the part about haskell/ocaml.