4 ms·
Maybe I don't get it, but why would I use this? What problem is it solving that insert JS framework isn't? I understand JS is popular to hate, for a variety of
by patientplatypus 9y ago
Maybe I don't get it, but why would I use this? What problem is it solving that insert JS framework isn't?
I understand JS is popular to hate, for a variety of reasons, but those reasons seem mostly to boil down to nerd cred. The "hate what's popular because being contrarian means I'm cool" crowd.
So, and this is an honest question here, why should I invest the time to learn an entirely new syntax for a framework to build web applications? What can this do that vue.js or react cannot? (And I don't mean it does it differently I'm looking for it does it better or JS framework doesn't do it.)
- coldtea 9y ago>What can this do that vue.js or react cannot? It allows you to write your web app in Rust. >And I don't mean it does it differently I'm looking for it does it better or JS framework doesn't do it. "Better" depends on the use case, so merely by being different something might better fit another use case.
- patientplatypus 9y agoOk...is there a use case where Rust is better? This seems like you're punting. Why would I want to invest the time and energy to learn this?
- xfer 9y agoYou wouldn't invest time and energy to build web app in rust, but you would be able to write your frontend in rust instead of investing time and energy in $JSFRAMEWORK of the year.
- _Tev 9y agoOf the year? So react is new or something? This is super outdated meme at best.
- kbenson 9y agoFor some of the same reasons you might want to write your back-end in JS, but going the other direction. You could share code between front-end and back-end, but have a very strongly typed, secure, fast, and less prone to bugs language to do it in. Not everyone's cup of tea, but if you're already got a lot of code written on the back-end, this might make a lot of sense.
- justaaron 9y agoI'd imagine that it's useful to be able to share a data context between a route-handler, for example, and it's rendered template and the embedded client side "scripting" that may be quite extensive these days. ("scripting" in quotes because of how rust embedded in the html templates can be so much more than logic-less templates- a bit like a server side template, the dom, and clientside javascript all in one- and I'm just guessing, but because it's not dynamic, but compiled, nonetheless safe even though logic is in there...)
- unrealhoang 9y agoSimply put, at the moment, you wouldn’t. But when wasm is mature enough (host binding to control DOM directly), there will be framework for 10x performance (compares to js’). This framework is a step toward that direction. Also it provides options for Rust programmers to not touching js. Totally worth it.
- lmm 9y ago> I understand JS is popular to hate, for a variety of reasons, but those reasons seem mostly to boil down to nerd cred. The "hate what's popular because being contrarian means I'm cool" crowd. Then you're not paying attention. I'm not sure how you expect anyone to answer your "honest question" when you've already dismissed all the answers. It's not just fashion, programming language design is a real thing that it's possible to do badly or well, Javascript is a legitimately bad language, and Rust is a legitimately good language. Learn Rust or another ML-family language, actually learn it to the point where you can write a decent, full-sized, idiomatic program in it. It won't be easy, but it's worth it. I mean, I could talk through all the reasons such languages are better, but it seems like you're already determined to dismiss them, so really the only way is to see for yourself.
- _Tev 9y ago> Javascript is a legitimately bad language, and Rust is a legitimately good language. Yeah, statements like these without even trying to back them up are pretty ridiculous. Sometimes someone brings some stupid issue that's never a problem in practice, but most of the time people just admit they simply have no real experience with JS. They just love to claim how superior they are, and anyone who disagrees is "not paying attention". FYI you are just showing how awful are communities around "legitimately good" languages.
- rebotfc 9y ago> FYI you are just showing how awful are communities around "legitimately good" languages. Just to let you know Rust's community is pretty cool and not awful at all. For instance the Rust Survey 2017 reports that 98.7% of respondents feel welcome within the Rust Community. Furthermore according to the Stackoverflow 2017 survey, Rust is the "most loved" language.
- _Tev 9y agoSure, I bet community is great otherwise, it is just occassional elitism (which I guess was inherited from the C++ community) that comes off as toxic. Btw that same survey showed how people are quite fine with writing JS, which makes this entire thread seem even more ridiculous.
- tormeh 9y agoThe reason people like Rust more than JavaScript is that Rust is a better at what it tries to do than JavaScript is at what JavaScript tries to do. That said, they don't try to do the same thing, so you shouldn't use Rust in all situations. Rust is focused on speed, safety, and low bug count, but it's slow and annoying to write and refactor. If you are willing to make that trade-off then do; if not, then don't.
- _Tev 9y agoWhy is JS bad at "what it tries to do"? I've honestly not seen answer in these discussions, even though everyone acts like they are obvious. From my experience main problems seem to be: 1) poor static analysis of code, leading to bad Intellisense etc. - Mostly solved by TypeScript. 2) DOM manipulation APIs. I don't see how Rust will help here. Especially considering JS frameworks solve this. I guess that's what's new in the OP. Otherwise JS serves as pretty good language for beginners/UI wiring. But thanks for at least describing some strengths (and weaknesses) of Rust when directly compared with JS.
- rebotfc 9y ago> poor static analysis of code, leading to bad Intellisense etc. - Mostly solved by TypeScript. Typescript is not Javascript. Most people would agree that that Typescript is a reasonable language. The fact that it can be transpiled to Javascript is irrelevant, many languages can be transpiled to Javascript.
- _Tev 9y agoWell it is still mostly JS. Claiming JS is crap (often stated as "beyond repair") and TS is good just because of (arguably) light addition shows some serious cognitive dissonance. But nevermind: > The fact that it can be transpiled to Javascript is irrelevant It has nothing to do with JS, right? :)