Replies: 2 comments
-
Thanks for this interesting perspective! I have to say I almost completely disagree, but appreciate the feedback. From my perspective, the only reason to use this framework is that you prefer writing Rust to JavaScript, or have significant parts of business logic that are written in Rust or use Rust libraries. If anyone ever asks me, I'd always tell them that the best way to learn Rust is by learning Rust; in the same way that I'd say someone should learn JavaScript before learning how to use Svelte (a language that compiles to JavaScript) or React (a JavaScript library), they should learn Rust before learning how to use Leptos (a Rust library). I don't think it's that surprising that someone who doesn't have experience with Rust and looks at a Rust web framework for the first time would have questions about Rust syntax or semantics. I hope that this will be a framework that makes it easy for people who enjoy using the Rust programming language or are interested in learning it to make web apps and sites. If we ever live in a world in which people "learn Leptos" rather than "learning Rust" in the way that people now talk about "learning React" (and maybe even "learning Svelte"?) rather than "learning JavaScript," that will have been a failure on my part. I'm sure not everyone agrees with my opinion on this, and that's fine! |
Beta Was this translation helpful? Give feedback.
-
Hey I want to give a feedback from a perspective of a web developer (about 8 years od experience) who has never done Rust before. After one day of fighting with both Rust and Leptos I've resolved most of the problems and now I'm able to code without any interruptions or hiccups. So I disagree with the OP. It's fairly simple and if someone really wants to use Leptos (like me) they'll learn it quite fast. |
Beta Was this translation helpful? Give feedback.
-
Having spent a considerable amount of time in web development, I've observed that frameworks like React (yes, it's a framework), Svelte, and others have done an excellent job of shifting the developer's focus away from mastering the underlying programming language. Instead, these frameworks encourage developers to concentrate on becoming proficient in using the framework itself. This is why many web developers are well-versed in these frameworks, but if you were to ask them to write plain JavaScript, they might find it quite challenging.
When I first encountered Leptos, despite being a Rust enthusiast, my initial impression was how much verbose it was compared to Svelte or React while accomplishing the same tasks.
When web developers hear about Rust and seek an example, they often turn to Leptos or another web framework in Rust. However, i assume they'll tend to have numerous questions when examining the code, unlike their experience with JavaScript frameworks. For instance, they might inquire about the following:
impl
=> which means you'll need to understand traitsmove
and what is the*
sign and is it necessary? => you'll have to understand borrowing and ownership|_|
=> you'll have to understand closuresAs you can see, getting started with Leptos requires a significant investment of time in learning Rust. In comparison, when using JavaScript frameworks like Svelte or React, all you need to grasp are basic programming concepts like functions and variable declarations, making the code appear less intimidating. If you follow the framework's conventions, you'll usually be in good shape.
We are already leveraging macros to abstract what's happening beneath the surface, such as view! or #[component] and I propose that we utilize even more macros (until the code resembles JavaScript to some extent 😆)
Beta Was this translation helpful? Give feedback.
All reactions