Hacker News new | ask | show | jobs
by pcan77 2134 days ago
I promise you that the amount of JS devs who LIKE Rust is not very high. I cannot imagine going from a language like JS or TS to the confusing syntactical monster that is Rust.

I realize this is an unpopular opinion, but JS/TS is WAY more human readable than Rust is. It's almost the equivalent of programming in C for the browser. Plus, literally anything you could ever want to use in already in the JS ecosystem and doesn't have to be reinvented in Rust.

2 comments

I do not disagree on the amount of JS devs who like rust (how many even know that rust exists?), what you think is a syntactical monster I find more readable than JS (except when generics are abused, which is rare in my experience). Just by having no parenthesis around "if" it becomes a lot cleaner, and together with anonymous / arrow function syntax in js it becomes even more confusing. Its still very subjective, but if you're going just for clean syntax, I feel like python is the real winner.

Also, explicitly borrowing in method signatures is a BIG plus for me as its a lot easier to understand an API when its clear whether it mutates or not an argument, as opposed to JS where number arguments just cannot be mutated and pointer arguments (such as arrays) always can be mutated. I find understanding random github projects a lot easier in rust than js or python.

I'm not saying you should use rust, but many like rust specifically because of its readability and even find they're more productive in the long term because of its "high level" features and explicitness (although LEARNING it is a lot harder).

> literally anything you could ever want to use

...so but how's the quality of npm ecoshitstem? last time I heard you guys had some trouble in paradise, plus everything noteworthy is owned by either facebook or google, both having huge antitrust issues lately