I want to address this one point: > Similar thing can be said about writing SQL. I was really happy with using sqlx, which is a crate for compile-time checked SQL queries. By relying on macros in Rust, sqlx would execute the query against a real database instance in order to make sure that your query is valid, and the mappings are correct. However, writing dynamic queries with sqlx is a PITA, as you can’t build a dyn…
sqlx doesn't build queries, or at least it minimally builds them. Which I think is the thing the OP is complaining about. And, IMO, making dynamic queries harder is preferable. Dynamic queries are inherently unsafe. Sometimes necessary, however you have to start considering things like sql injection attacks with dynamic queries. This isn't to poo poo sea-orm. I'm just saying that sqlx's design choice to make dynamic…
Farewell, Rust for web
31–40 of 197 posts
Re: Farewell, Rust for web
#32but the truth is that Rust is not meant for everything. UI is an abstraction layer that is very human and dynamic. and i can come and say, “well, we can hide that dynamism with clever graph composition tricks” à la Elm, React, Compose, etc, but the machinery that you have to build for even the simplest button widget in almost every Rust UI toolkit is a mess of punctuation, with things like lifetimes and weird state management systems. you end up building a runtime when what you want is just the UI. that’s what higher level languages were made for. of course data science could be done in Rust as well, but is the lifetime of the file handle you’re trying to open really what you’re worried about when doing data analysis?
i think Rust has a future in the UI/graphics engine space, but you have to be pretty stubborn to use it for your front end.
Re: Farewell, Rust for web
#33Re: Farewell, Rust for web
#34Better title: "Farewell, Rust for Web"
Re: Farewell, Rust for web
#35Earlier quoted context omitted.
sqlx doesn't build queries, or at least it minimally builds them. Which I think is the thing the OP is complaining about. And, IMO, making dynamic queries harder is preferable. Dynamic queries are inherently unsafe. Sometimes necessary, however you have to start considering things like sql injection attacks with dynamic queries. This isn't to poo poo sea-orm. I'm just saying that sqlx's design choice to make dynamic…
They didn't make them hard by design, I think, it's just the limitations of the current API and prioritisation. Dynamic queries are possible, just not trivial
[1] https://github.com/launchbadge/sqlx/issues/333#issuecomment-...
Re: Farewell, Rust for web
#36[flagged]
If you don't want to be banned, you're welcome to email hn@ycombinator.com and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.
Re: Farewell, Rust for web
#37Better title: "Farewell, Rust for Web"
Re: Farewell, Rust for web
#38Earlier quoted context omitted.
Python used to have a great standard library, too. But now it's stuck with a bunch of obsolete packages and the packaging story for Python is awful. In a decade or so Go the awkward things about Go will have multiplied significantly and it'll have many of the same problems Python currently has.
I just ported (this week) a 20-year-old Python app to uv/polars. (With AI it took two days). App is now 20x faster.
Re: Farewell, Rust for web
#39Re: Farewell, Rust for web
#40Earlier quoted context omitted.
Python used to have a great standard library, too. But now it's stuck with a bunch of obsolete packages and the packaging story for Python is awful. In a decade or so Go the awkward things about Go will have multiplied significantly and it'll have many of the same problems Python currently has.
Lots of removals have already happened and uv took over packaging in Python-land.