Hacker News new | ask | show | jobs
by boredumb 1068 days ago
Just write in Rust, it's easier to build good software than either of these languages (yea, yea, do you data analyst stuff in python until you start using POLARS). At this point it's a far superior ecosystem from a developer experience point of view and the fact it's going to get you as close to efficient as possible without you thinking too far into it is a welcome side effect.

Using VScode with the Sqlx package I get compile time errors on my SQL - as a result I haven't ran a binary with a typo from my SQL in the last 12 months.

3 comments

Easy? No. Rust is a far more difficult language to work in than Python.

It will require you to write more correct code, so the end product is more likely to come out better. But it is not easy, even for building "good" software. (Assumption: "good" := correct, maintainable, efficient, and robust -- Rust nails the efficient part.)

Are there any good interactive programming options in Rust? That's the main draw of a dynamic language like Python for ad hoc data science tasks, the semantics just lines up well with the highly iterative nature of the work.
I know I saw earlier in the year a Jupyter notebook for rust - but I haven't used it personally so I'm not sure how nicely it will play. I use jupyter+python to view and play with the data usually and then write my actual job in rust with Polars to use as the ETL or whatever i'm doing with it at that moment.
Do you use an extension other than just `rust-analyzer` in order to get compile-time errors for SQL with sqlx?
I believe it's just the rust-analyzer - I only installed the rust extension via vscode so it may have included an extra bit.
To follow up - no, I reproduced an error - disabled my rust-analyzer extension in vscode and it went away.