Earlier quoted context omitted.
Esp-rs has come a long way although it's still very much in a beta phase.
Ah I was writing a reply to someone else as you commented this :) We've got experimental projects with some ports of our firmware to it already, but there are lots of showstoppers that we've run into (some of which are ESP-IDF's fault more-so than esp-rs directly). In the medium-to-long-term, I'm really hopeful we can move to it. Not quite there yet for our production use cases though unfortunately.
Switching from C++ to Rust
41–50 of 289 posts
Re: Switching from C++ to Rust
#42Re: Switching from C++ to Rust
#43The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
(And C++ std::optional is somewhat similar to Rust's Option type.)
https://github.com/facebook/folly/blob/main/folly/Expected.h...
Re: Switching from C++ to Rust
#44Re: Switching from C++ to Rust
#45The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
I'm just nitpicking but Rust is 7 years old and 7 doesn't feel almost 10...
Edit: Rust hit 1.0 7 years ago. Now I feel silly.
Re: Switching from C++ to Rust
#46The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
so, um, unions? i have to say that in many years of programming, i have almost never needed to use such types.
Re: Switching from C++ to Rust
#47The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
> I've been using Rust daily for almost 10 years now, I'm just nitpicking but Rust is 7 years old and 7 doesn't feel almost 10... Edit: Rust hit 1.0 7 years ago. Now I feel silly.
First spike at Google Trends for "Rust (Programming Language)" happened back in late 2013/early 2014 (https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...) so not at all impossible for someone to have ~10 years experience with it. Although that's probably pretty uncommon.
As a bonus, here is a very old (by internet time standards) HN submission titled "Mozilla releases version 0.1 of the Rust programming language (mail.mozilla.org)" - 236 points | Jan 23, 2012 | 82 comments - https://news.ycombinator.com/item?id=3501980
Re: Switching from C++ to Rust
#48The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
> I've been using Rust daily for almost 10 years now, I'm just nitpicking but Rust is 7 years old and 7 doesn't feel almost 10... Edit: Rust hit 1.0 7 years ago. Now I feel silly.
Re: Switching from C++ to Rust
#49The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
Yeah. In the C++ codebase I work on, we use folly::Expected (essentially similar to Rust's Result ) heavily. Is it as ergonomic as Result is in Rust? Absolutely not. But it's still a nice design pattern for some of the same reasons people use Result in Rust. (And C++ std::optional is somewhat similar to Rust's Option type.) https://github.com/facebook/folly/blob/main/folly/Expected.h...
Re: Switching from C++ to Rust
#50The call out to sum types is something I feel. I've been using Rust daily for almost 10 years now, and sum types are absolutely still one of the things I love most about it. It's easily one of the things I miss the most in other languages that don't have them. I'm usually a proponent of "using languages as they're intended," but I missed exhaustiveness checking so much that I ported a version of it to Go[1] as a sort…
> I've been using Rust daily for almost 10 years now, I'm just nitpicking but Rust is 7 years old and 7 doesn't feel almost 10... Edit: Rust hit 1.0 7 years ago. Now I feel silly.