Live data from Hacker News

A Gopher Meets a Crab

miren.dev

41–50 of 79 posts

Re: A Gopher Meets a Crab

#41
post #33

Earlier quoted context omitted.

Go and rust share very few similarities when you consider the syntax.

If you believe that then you haven’t spent much time working in different paradigms of programming languages. Syntax is the easy stuff to learn. It’s any shifts in paradigms (eg pure functional vs imperative vs logic… etc) that takes time to learn. And I say this as someone who’s written professional software in well over a dozen different languages. So I understand well the challenges learning something new.

I have written production code in about a dozen languages as well believe it or not.

I have also trained people who were good to decent software engineers in other languages to write rust. The syntax is nontrivial for a lot of people. There are a lot of people who gave up trying to learn rust, especially before the rust book became what it is today.

People typically fight the borrowchecker until it clicks. Learning from an LLM and reading only means you have to be as good as the rust compiler without any experience writing the language. It's got to be way harder that way.

Re: A Gopher Meets a Crab

#42
Learning Go after five years of professional struggle with Rust was a relief; Go feels designed for humans to just get the job done. (not a Google fan!) I'll get a ton of downvote for this but it's ok.

Re: A Gopher Meets a Crab

#43
post #29

Earlier quoted context omitted.

I would be very surprised if you couldn’t figure out what was happening in one C-derivative language when you’re already competent in another C-derivative language. This isn’t like learning JavaScript and then expecting to be an expert in Prolog.

The first time I looked at rust code that wasn't in tutorial I was pretty confused. Things I thought I understood I really didn't. I knew maybe 6 programming languages including some c. A lot of people struggle to learn rust because it's an ML as in OCAML and really isn't much like C at all. Some people adapt to it more easily, especially coming from languages like scala but it has a lot of unique characteristics tha…

Scala is a great language. And Rust definitely has noticeable influences from ML. But I’d say Rust is closer to C++ than it is to ML.

But, to be fair to you, I’ve not touched Rust in a couple of years so maybe my memory is fallible here?

Re: A Gopher Meets a Crab

#44

I feel like having an LLM write code in a language you aren't familiar with and then inspecting the results is kind of like hiring someone to speak Spanish for you and then being confused at the weird words they are using. Like, what would make you want to do this?

That's a terrible analogy:) It is more like you wanting to build a bed out of wood so you hire a carpenter and watch them and ask questions about every step and maybe help a bit at the end. I find it amazing to learn new programming things

Well it's an LLM so it's more like you ask your uncle Vinny who is pretty good at a bunch of stuff but sawed off their arm the other day

Re: A Gopher Meets a Crab

#45

Learning Go after five years of professional struggle with Rust was a relief; Go feels designed for humans to just get the job done. (not a Google fan!) I'll get a ton of downvote for this but it's ok.

I find your experience interesting. People below are saying you can understand rust super easy if you know go. Meanwhile you are saying rust was a struggle and go is a relief.

So which is it?

The answer is rust has very little in common with go. Rust is very explicit and go is not. Some people find the explicit nature of rust and it's guarantees refreshing. Other people find go refreshing because the syntax is more limited and it looks simple on paper.

Re: A Gopher Meets a Crab

#46
post #33

Earlier quoted context omitted.

If you believe that then you haven’t spent much time working in different paradigms of programming languages. Syntax is the easy stuff to learn. It’s any shifts in paradigms (eg pure functional vs imperative vs logic… etc) that takes time to learn. And I say this as someone who’s written professional software in well over a dozen different languages. So I understand well the challenges learning something new.

I have written production code in about a dozen languages as well believe it or not. I have also trained people who were good to decent software engineers in other languages to write rust. The syntax is nontrivial for a lot of people. There are a lot of people who gave up trying to learn rust, especially before the rust book became what it is today. People typically fight the borrowchecker until it clicks. Learning f…

> I have written production code in about a dozen languages as well believe it or not.

You said 6 in your other comment. Which is half a dozen.

But I take your point about the syntax being complex. That was the main reason I stopped coding in Rust: not because I couldn’t learn the language but because I didn’t enjoy the complexity. To me it felt like it needed someone to reign in design choices (Python is suffering from this problem now too).

On a slight tangent: one of my pet peeves is feature creep in programming languages. It makes it harder to learn the language. Harder to agree on coding styles in teams. Easier to fuck up and thus requires you to be on your A-game when writing code for it. I don’t always agree with Go’s choices, but I respect that the language is conservative in what gets approved into the language. This is a takeaway more languages need to learn from.

Anyway, back on topic: I don’t agree that the syntax and borrow checker constitutes as “a different paradigm”. But I’ll concede that I might be overstating how easy it is for others to learn these idioms.

Re: A Gopher Meets a Crab

#47
post #39

Earlier quoted context omitted.

I would not say that Go and Rust have similar paradigms

You’re conflating paradigms with idioms. Go and Rust have different idioms and syntax. But they occupy broadly similar paradigms. For example, you don’t need to relearn how to do iteration like you would with a logic or pure functional language. You wouldn’t need to concepts like methods, like you would if you were coming from a stack based language. Etc

I think this comment weasels around the intent of the poster without acknowledging their meaning.

Go and rust have very little in common. If you consider them to be the same paradigm that's fine. But I don't think most people would as rust leans more functional.

Re: A Gopher Meets a Crab

#48
post #39

Earlier quoted context omitted.

You’re conflating paradigms with idioms. Go and Rust have different idioms and syntax. But they occupy broadly similar paradigms. For example, you don’t need to relearn how to do iteration like you would with a logic or pure functional language. You wouldn’t need to concepts like methods, like you would if you were coming from a stack based language. Etc

I think this comment weasels around the intent of the poster without acknowledging their meaning. Go and rust have very little in common. If you consider them to be the same paradigm that's fine. But I don't think most people would as rust leans more functional.

“Leaning into functional” isn’t a hard thing to learn. However pure functional is when coming from an imperative language.

And that’s the point I was always making. Rust takes inspiration from different languages than Go. But there is a huge amount of borrowed experience you can lean on when switching between Go and Rust. You’re not starting from scratch.

Perhaps the real problem here is that developers stick to a subset of similar imperative languages and then moan that minor differences are hard to reason about?

Re: A Gopher Meets a Crab

#49
post #46

Earlier quoted context omitted.

I have written production code in about a dozen languages as well believe it or not. I have also trained people who were good to decent software engineers in other languages to write rust. The syntax is nontrivial for a lot of people. There are a lot of people who gave up trying to learn rust, especially before the rust book became what it is today. People typically fight the borrowchecker until it clicks. Learning f…

> I have written production code in about a dozen languages as well believe it or not. You said 6 in your other comment. Which is half a dozen. But I take your point about the syntax being complex. That was the main reason I stopped coding in Rust: not because I couldn’t learn the language but because I didn’t enjoy the complexity. To me it felt like it needed someone to reign in design choices (Python is suffering f…

The number depends on if you count html/css, bash, powershell, etc as programming languages.

I don't blame your choice to walk away from rust. It is more complex than other languages. I like it because it makes the complexity explicit. Other people really do not. Both views are valid.

I think that explicit nature for memory handling is a paradigm change. Though I do understand that the definition of programming paradigms isn't really inclusive of that. But it introduces changes to how the language is composed, run, and compiles that aren't a part of other paradigms necessarily.

Eg, It's not a lint to have a use after free for rust. It's part of the acceptable subset of the language and must be expressed in the code.

Re: A Gopher Meets a Crab

#50

Learning Go after five years of professional struggle with Rust was a relief; Go feels designed for humans to just get the job done. (not a Google fan!) I'll get a ton of downvote for this but it's ok.

I find your experience interesting. People below are saying you can understand rust super easy if you know go. Meanwhile you are saying rust was a struggle and go is a relief. So which is it? The answer is rust has very little in common with go. Rust is very explicit and go is not. Some people find the explicit nature of rust and it's guarantees refreshing. Other people find go refreshing because the syntax is more l…

Yes: I do say Rust was a struggle and go is a relief. Yes: rust has very little in common with go. Yes: Rust is very explicit and go is not. Yes: Other people find go refreshing because the syntax is more limited and it looks simple on paper. So, you're right.

IMO: Go is a very "productive" and clean lang/platform when comparing to Rust. It's depends what you're using it for. In my case (for concurrent backends) Go came as a bliss. And that was before AI (vibecoding).

Post reply on HN