The weird-looking Rust isn’t really Rust being weird, it’s the type telling the truth.
Result<Option<Result<Message, WsError>>, Elapsed>
That’s three independent “not the happy path” channels: timeout, stream closed,
and websocket error.
The nicer version is not a cleverer match. It’s choosing a domain error shape
and converting into it one layer at a time:
let timed = tokio::time::timeout(duration, receiver.next()).await;
let next = timed.map_err(|_| ReceiveError::Timeout)?;
let item = next.ok_or(ReceiveError::Closed)?;
let msg = item.map_err(ReceiveError::WebSocket)?;
The ugly line is what happens when you have not decided where to normalize the
shape yet.
Sometimes you just want a fancy boolean. The advantage is that Result has all the Result APIs and you can compose it with other Results, but otherwise this is just a success bool.
It's basically doing the same thing that, say, `return true` might do to indicate a function succeeded, but with more explicit types. However, because it uses `Result`, it can be used with the `try`/question mark operator which can be convenient in some situations.
That said, a couple of the examples here feel a bit strange - they're clever things you can do, but they're not necessarily things you often have to do, particularly for a relatively simple task like this. I think the problem with the author's approach is that they can't distinguish between "weird because Rust is weird" and "weird because the LLM generated bad code", because they (understandably) don't have enough experience in what good Rust code looks like.
it is indeed pretty weird. clippy has a lint against this iirc. it's recommended to just create a custom error type, even if its just an empty struct or a single-variant enum
this lets you implement `std::error::Error`, which you really should to make it less painful when you want to erase the type (`std::error::Error` is `dyn`-compatible)
Probably on topic here - I talk like an LLM sometimes, and parse my points through them sometimes. I’d reasonably use that terminology and think nothing of it as it’s precise and correct. That said, this was partially LLM and my thinking here.
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?
If you already speak French or another Romance language it isn’t a bad idea to just have a conversation in Spanish directly and then ask for clarifications anytime you don’t understand.
Which would be all the time? At which point you might be better served by learning from a source that has any guarantees of being correct and doesn't hallucinate. Like text books that have had several editions and are free on the Internet.
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 that aren't in C or are even related. Like lifetimes, dynamic dispatch through enums, the borrowchecker, pattern matching, the ? Operator, etc.
Maybe you all are way smarter than me, super possible, but I wouldn't expect much to translate between go and rust. I think some evidence for that is the blog post here...
I don't think it's a memory thing. The original rust compiler was written in OCAML. I think it's closer to an ML personally because of the strong focus on the type system rather than the chr* magic of c/c++.
Over the years c++ has been influenced to offer things people like from rust. So modern c++ looks a little more like rust. But older c++ really doesn't.
Similarly rusts approach to dynamic dispatch is more like OCAML than c++.
You can use rust and c++ for similar objectives though. Anyone can reduce two technical things until they are identical or expand them until they are completely different.
I think the most sober take is they are sufficiently different from one another.
How much familiarity do you need to be starting from scratch?
In a later comment you said the following:
> You aren't starting from scratch in the same way that if you have written javascript you aren't starting from scratch writing c++.
But I’d argue that you wouldn’t be starting from scratch with C++ as a JS developer either because you already understand all the fundamentals of imperative programming:
- objects, properties and methods
- functions
- iteration (for loops are literally written the same)
- variable assignment
- expression notion and the order of precedence for operators
- global variables vs local variables
And so on and so forth.
Whereas going to ASM, LISP, Forth, or Prolog would require relearning everything you thought you knew about programming.
So to that point, once you learn Go, you could write a function in JS, C, Rust, and so on. You’d know roughly how to structure it and what syntax to use. You might not write the best and most idiomatic version of that function because you might not fully appreciate the differences with type system, variable referencing, macros, and so on. But that’s all knowledge you’d build upon from the experience you already have.
And the reason I make this distinction is because we were specifically talking about using an LLM for teaching.
To learn the nuances between languages of the same paradigm, the best way to learn is to write a project in that language. Whereas when going to something entirely alien like Prolog, you first need to learn the fundamentals (eg “from a book”) before you could even think about starting a project.
And what this guy did was work with an LLM on a project to learn the differences between Go and Rust.
So my point was those two languages are similar enough that the authors approach seems very reasonable to me. Whereas if he’d tried to do this with (for example) Haskell, then I’d have agreed with the naysayers.
Not the author but this seems a good approach to me because you learn more about a language from implementing a project in it. This is especially true when you already have experience in a language from the same paradigm (like Go and Rust are).
So getting an LLM to write an example project then dissecting the code and interrogating those choices, seems like a very good way to learn the idioms of another language.
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.
> 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.
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.
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?
Nah, it's an awful way to learn. Especially to learn to be good or great.
When you start reading, it helps to have some guidance towards good and relevant books, from e.g. school, mentors, criticism, etc. Then, when you encounter a "bad" book, you have some benchmarks from which you can build your capacity for analysis and critique. (Testing your analysis and critique with others helps, too.)
If you start with "bad" books, your concept of quality and what's possible is constrained. (Like when teenage boys read Atlas Shrugged.)
Reading slop code is a terrible way to build a mental benchmark for what's good, what's possible, what's elegant, and writing good code that is respectful to your fellow human beings.
Um, it’s pretty obvious why Result<Option<Result<Option<T>>>> or Result<(),()> is bad, I’m not going to spend time explaining when I doubt you’re asking in good faith.
Of course I’m asking in good faith. I wouldn’t have asked how you’d implement the same problem yourself if I wasn’t interested.
But you also have to understand that it’s very easy for people to say “x is bad” when actual real world problems sometimes require a small smattering of ugly code. So it’s not unreasonable for me (or anyone else) to ask how you’d write a solution to the same problem.
Now what I’m trying to understand is whether the examples highlighted by the author as ugly, was ugly because it’s bad code. Or ugly because it was the right solution which lead to ugly code. Which is why I was asking for your preferred solution.
Looking at the code briefly, the first example could be written as
let msg = timeout(Duration::from_secs(2), receiver.next()).await.ok()??;
// not shown in article, but next line of code
let Message::Text(frame) = msg_result.ok()? else {
return None;
};
Looks like the fixed the second issue with anyhow::Result<()>
Yeah I have had LLMs write scripts and changes in languages I can't really read for throwaway uses but I have not really found it useful to go and inspect the code because I don't feel I would learn much
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.
After sawing off his arm while assembling an barstool he also gives advice about assembling rocket engines without any loss in confidence. Good old uncle Vinny always there when you need him.
It's one of the best use cases for LLMs IMO. Programmers being empowered to do stuff they wouldn't dare before and/or do what they know, but faster. Having a person who never wrote much code (if any) before is a recipe for disaster because LLMs, even latest models with CC/Codex make mistakes and often code where a happy path (kinda) works, but edge cases don't . You have to check and iterate and specify. But also, programmers (seniors at the very least) have an intuition about how the system should work and they know algorithmization in general. They know how to do a thing in pseudocode on paper. In the end, you become kind of an architect of the system. LLMs give you the ability to choose the right tool for the job even if you have suboptimal or even very little experience with the given tool. There are footguns of course and I wouldn't work on say a system handling client money (banks...) this way, but most uses can take it.
As far as being taught a new language and its ecosystem through an LLM, is SO much faster than reading a book + documentation, it's like asuperpower.
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.
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).
std::expected and the utility functions for it (and_then(), or_else()) are pretty much the same, though? Or am I completely misunderstanding something?
It's true that `std::expected` is like if a C++ programmer saw a type like Result in a shop window and copied the parts they understood from that and so certainly if you're a C++ programmer this is superficially satisfying.
The blog post uses, among other things, the Try operator ? and pattern matching, neither of which are available in C++ and both of which make the Result type much nicer to use than std::expected. There have been similar "I saw it in a shop window" proposals for both these in C++, and I expect that pattern matching in particular will be attempted again targeting C++ 29.
People really are forgetting how to think. While reading this blog post I almost immediately flipped into teaching confused freshmen taking the course that wasn't their major mode.
A much more charitable reading of the article is "here's some observations I found interesting / different". I met the author at the conf and watched their talk. Their perspective was very much in the camp of exploration, learning, wonder, etc. and not in the camp of criticism of either rust or vibe coding practices.
Interesting that the talk was quite different, because this clearly AI generated article was condescending and infuriating. Quite a difference apparently.
The weird-looking Rust isn’t really Rust being weird, it’s the type telling the truth.
That’s three independent “not the happy path” channels: timeout, stream closed, and websocket error.
The nicer version is not a cleverer match. It’s choosing a domain error shape and converting into it one layer at a time:
The ugly line is what happens when you have not decided where to normalize the shape yet.
Is pretty weird, though, no? Why would you want a unit value / error type?
Sometimes you just want a fancy boolean. The advantage is that Result has all the Result APIs and you can compose it with other Results, but otherwise this is just a success bool.
It's basically doing the same thing that, say, `return true` might do to indicate a function succeeded, but with more explicit types. However, because it uses `Result`, it can be used with the `try`/question mark operator which can be convenient in some situations.
That said, a couple of the examples here feel a bit strange - they're clever things you can do, but they're not necessarily things you often have to do, particularly for a relatively simple task like this. I think the problem with the author's approach is that they can't distinguish between "weird because Rust is weird" and "weird because the LLM generated bad code", because they (understandably) don't have enough experience in what good Rust code looks like.
It’s the equivalent of Haskell’s Either, with Option being the equivalent of Maybe. They’re fairly well-defined idioms.
I know what Result<> is.
it is indeed pretty weird. clippy has a lint against this iirc. it's recommended to just create a custom error type, even if its just an empty struct or a single-variant enum
this lets you implement `std::error::Error`, which you really should to make it less painful when you want to erase the type (`std::error::Error` is `dyn`-compatible)
Off topic but using “shape” like this is LLM coded
I guess I'm an LLM then. I've been referring to the structure of types as "shape" for more than a decade and so have plenty of others
Probably on topic here - I talk like an LLM sometimes, and parse my points through them sometimes. I’d reasonably use that terminology and think nothing of it as it’s precise and correct. That said, this was partially LLM and my thinking here.
It’s good, I found your comment relevant and insightful
No it is not. If you were introduced to the term via LLMs doesnt mean everyone was.
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?
If you already speak French or another Romance language it isn’t a bad idea to just have a conversation in Spanish directly and then ask for clarifications anytime you don’t understand.
Which would be all the time? At which point you might be better served by learning from a source that has any guarantees of being correct and doesn't hallucinate. Like text books that have had several editions and are free on the Internet.
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 that aren't in C or are even related. Like lifetimes, dynamic dispatch through enums, the borrowchecker, pattern matching, the ? Operator, etc.
Maybe you all are way smarter than me, super possible, but I wouldn't expect much to translate between go and rust. I think some evidence for that is the blog post here...
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?
I don't think it's a memory thing. The original rust compiler was written in OCAML. I think it's closer to an ML personally because of the strong focus on the type system rather than the chr* magic of c/c++.
Over the years c++ has been influenced to offer things people like from rust. So modern c++ looks a little more like rust. But older c++ really doesn't.
Similarly rusts approach to dynamic dispatch is more like OCAML than c++.
You can use rust and c++ for similar objectives though. Anyone can reduce two technical things until they are identical or expand them until they are completely different.
I think the most sober take is they are sufficiently different from one another.
I think the crux of our disagreement is this:
How much familiarity do you need to be starting from scratch?
In a later comment you said the following:
> You aren't starting from scratch in the same way that if you have written javascript you aren't starting from scratch writing c++.
But I’d argue that you wouldn’t be starting from scratch with C++ as a JS developer either because you already understand all the fundamentals of imperative programming:
- objects, properties and methods
- functions
- iteration (for loops are literally written the same)
- variable assignment
- expression notion and the order of precedence for operators
- global variables vs local variables
And so on and so forth.
Whereas going to ASM, LISP, Forth, or Prolog would require relearning everything you thought you knew about programming.
So to that point, once you learn Go, you could write a function in JS, C, Rust, and so on. You’d know roughly how to structure it and what syntax to use. You might not write the best and most idiomatic version of that function because you might not fully appreciate the differences with type system, variable referencing, macros, and so on. But that’s all knowledge you’d build upon from the experience you already have.
And the reason I make this distinction is because we were specifically talking about using an LLM for teaching.
To learn the nuances between languages of the same paradigm, the best way to learn is to write a project in that language. Whereas when going to something entirely alien like Prolog, you first need to learn the fundamentals (eg “from a book”) before you could even think about starting a project.
And what this guy did was work with an LLM on a project to learn the differences between Go and Rust.
So my point was those two languages are similar enough that the authors approach seems very reasonable to me. Whereas if he’d tried to do this with (for example) Haskell, then I’d have agreed with the naysayers.
Not the author but this seems a good approach to me because you learn more about a language from implementing a project in it. This is especially true when you already have experience in a language from the same paradigm (like Go and Rust are).
So getting an LLM to write an example project then dissecting the code and interrogating those choices, seems like a very good way to learn the idioms of another language.
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.
> 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.
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.
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.
“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?
I don't think the differences between go and rust are minor.
You aren't starting from scratch in the same way that if you have written javascript you aren't starting from scratch writing c++.
They might share some paradigms (focus on low level optimization) but they aren't the same.
Go focuses on heavy runtime, looser type systems, and all the benefits and drawback that brings.
That’s not what people mean when they talk about paradigms in programming languages.
Nah, it's an awful way to learn. Especially to learn to be good or great.
When you start reading, it helps to have some guidance towards good and relevant books, from e.g. school, mentors, criticism, etc. Then, when you encounter a "bad" book, you have some benchmarks from which you can build your capacity for analysis and critique. (Testing your analysis and critique with others helps, too.)
If you start with "bad" books, your concept of quality and what's possible is constrained. (Like when teenage boys read Atlas Shrugged.)
Reading slop code is a terrible way to build a mental benchmark for what's good, what's possible, what's elegant, and writing good code that is respectful to your fellow human beings.
> Reading slop code is a terrible way to build a mental benchmark for what's good
The days of AI only being capable of producing unreliable slop code are long gone.
And yet the examples in this post are of slop code, so clearly they're not that long gone.
Except it generated bad unidiomatic code, so you’re just learning bad habits.
Can you share which parts of the code were bad?
Basically all of the code they shared in the article.
You’ll need to be more specific than that. Why was it bad? How would you have written it differently?
Um, it’s pretty obvious why Result<Option<Result<Option<T>>>> or Result<(),()> is bad, I’m not going to spend time explaining when I doubt you’re asking in good faith.
Of course I’m asking in good faith. I wouldn’t have asked how you’d implement the same problem yourself if I wasn’t interested.
But you also have to understand that it’s very easy for people to say “x is bad” when actual real world problems sometimes require a small smattering of ugly code. So it’s not unreasonable for me (or anyone else) to ask how you’d write a solution to the same problem.
Now what I’m trying to understand is whether the examples highlighted by the author as ugly, was ugly because it’s bad code. Or ugly because it was the right solution which lead to ugly code. Which is why I was asking for your preferred solution.
Looking at the code briefly, the first example could be written as
Looks like the fixed the second issue with anyhow::Result<()>
Have you tried? Give it a shot and see for yourself.
Yeah I have had LLMs write scripts and changes in languages I can't really read for throwaway uses but I have not really found it useful to go and inspect the code because I don't feel I would learn much
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
After sawing off his arm while assembling an barstool he also gives advice about assembling rocket engines without any loss in confidence. Good old uncle Vinny always there when you need him.
It's one of the best use cases for LLMs IMO. Programmers being empowered to do stuff they wouldn't dare before and/or do what they know, but faster. Having a person who never wrote much code (if any) before is a recipe for disaster because LLMs, even latest models with CC/Codex make mistakes and often code where a happy path (kinda) works, but edge cases don't . You have to check and iterate and specify. But also, programmers (seniors at the very least) have an intuition about how the system should work and they know algorithmization in general. They know how to do a thing in pseudocode on paper. In the end, you become kind of an architect of the system. LLMs give you the ability to choose the right tool for the job even if you have suboptimal or even very little experience with the given tool. There are footguns of course and I wouldn't work on say a system handling client money (banks...) this way, but most uses can take it.
As far as being taught a new language and its ecosystem through an LLM, is SO much faster than reading a book + documentation, it's like asuperpower.
Was anyone else expecting OpenClaw over gopher protocol?
I was looking forward to retro deep-dive back into the 90s. I just couldn't figure out where the crab fit in.
From vibe coding we now seem to have… tray-table coding?
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.
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).
I am glad you found something that works for you. Go forth and gopher it up
Still better than deciphering C++ soup of characters.
std::expected and the utility functions for it (and_then(), or_else()) are pretty much the same, though? Or am I completely misunderstanding something?
No, you’re not, the person you replied to is failing to look at their own criticism objectively.
It's true that `std::expected` is like if a C++ programmer saw a type like Result in a shop window and copied the parts they understood from that and so certainly if you're a C++ programmer this is superficially satisfying.
The blog post uses, among other things, the Try operator ? and pattern matching, neither of which are available in C++ and both of which make the Result type much nicer to use than std::expected. There have been similar "I saw it in a shop window" proposals for both these in C++, and I expect that pattern matching in particular will be attempted again targeting C++ 29.
Unfortunately, Rust made the great decision to copy most of its syntax from C++.
Um? Person vibe codes Rust. Output is stupid. The conclusion is either
a) Vibe coding produces bad code
b) Rust is weird
Somehow we’re supposed to accept b as the answer? Give me a break….
People really are forgetting how to think. While reading this blog post I almost immediately flipped into teaching confused freshmen taking the course that wasn't their major mode.
A much more charitable reading of the article is "here's some observations I found interesting / different". I met the author at the conf and watched their talk. Their perspective was very much in the camp of exploration, learning, wonder, etc. and not in the camp of criticism of either rust or vibe coding practices.
Interesting that the talk was quite different, because this clearly AI generated article was condescending and infuriating. Quite a difference apparently.