3 ms·
There’s a world outside of web development.
by jamil7 2y ago
There’s a world outside of web development.
- sergiotapia 2y agointeresting!
- steveklabnik 2y agoAlso, just because these examples are verbose doesn't mean that all Rust code is this way. Accessors/mutators aren't used super often in my experience, and the builder pattern is used occasionally, but isn't pervasive. (I have historically been very skeptical of Rust on the web, but by now, I find it pretty pleasant. I of course know Rust very well already though.)
- littlestymaar 2y ago> I of course know Rust very well already though Understatement of the week ;)
- LukeMathWalker 2y agoAgreed. There's also another aspect at play: to build knowledge one step at a time with this learn-by-doing approach, you have to get learners to write code that's not perfectly idiomatic along the way. You then correct and refine those first drafts as you progress along. In the case of setters, we get rid of them at the end of that chapter by using the newtype pattern thus guaranteeing that field invariants can't be broken even if you can access them directly.
- jimbob45 2y agoHe's right, though. Languages today shouldn't force you to jump through low-level hoops if you just want to write high-level logic. Likewise, the low-level devices should be easily and ergonomically accessible. Rust is phenomenal at the latter but weak at the former.
- jamil7 2y agoWhat languages scale better in that regard? Genuinely interested in recommendations.
- jimbob45 2y agoC# and C++. In C#, you can use pointers but most people don't even know because they so gracefully become invisible. Also ref/in/out keywords are there when you need them and invisible when you don't. Likewise, you don't even need to know about move semantics in C++ to make a simple web server. That said, C# and C++ most certainly have their fair share of issues.
- pkolaczk 2y agoCompared to most popular high level languages like Java or Go, Rust is seriously at the more expressive end (read: can be higher level).
- amne 2y agoBut who's forcing you? Oh .. the companies jumping on the latest "in Rust" hype. I see. Just do your thing and be good at it. PS: There was this VSCode extension to do BI stuff in the IDE (quarylabs/quary) showed here on HN and once I saw the CLI core having "Rust-based" as a feature I just closed the tab. What does "Rust-based" even mean? The tool may have been good but Rust is not a feature.