Live data from Hacker News

Farewell, Rust for web

yieldcode.blog

31–40 of 197 posts

Re: Farewell, Rust for web

#31
post #8

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…

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

Re: Farewell, Rust for web

#32
the idea of one language to rule them all is very compelling. it’s been promised a lot, and now everyone hates Java.

but 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

#33
I'm a heavy Rust user and fan, but I'd never pick Rust for web. There are way more mature ecosystems out there to choose from. Why would you waste "innovation tokens" in a Rust-based web application?

Re: Farewell, Rust for web

#34

Better title: "Farewell, Rust for Web"

Yes. This is one of the things that drives me nuts about a lot of titles on here: the context like “for the web” changes how it’s is interpreted a great deal. I see the same thing when I see posts about other languages and AI and such. Context matters versus making it sound like a broad, general statement. Alas, the broad, general statements likely get more engagement..

Re: Farewell, Rust for web

#35
post #31

Earlier 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

Nope, it really was part of the design [1]

[1] https://github.com/launchbadge/sqlx/issues/333#issuecomment-...

Re: Farewell, Rust for web

#36
post #2

[flagged]

You've been breaking the site guidelines so often and so badly that I've banned the account.

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

#38

Earlier 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.

Both uv and polars are technically Rust, too.

Re: Farewell, Rust for web

#40

Earlier 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.

Which, ironically, is written in rust
Post reply on HN