News for hackers. Stuff that matters.
Re:Single Page Applications using Rust by jimmaswell on Tuesday August 11, 2020 @01:12PM (#24122789)
What killer features does Rust have that I'm missing out on writing web apps in plain old Javascript? The only impressions I got trying to learn Rust are that it's very inconvenient, esoteric-looking (syntax is garbled about randomly from the norm for no apparent reason other than to be different - why go to such pains shortening everything like pub and fn when fn x -> int takes up so much more space than int x?), and really just not something I'd want to go through just to write a webpage.

Static checking etc. is nice but what's wrong with things like typescript? Do we really want web libraries fragmented into a million languages?

Re:Single Page Applications using Rust by steveklabnik on Tuesday August 11, 2020 @01:43PM (#24123266)
Just because they're JS devs, doesn't mean that they're doing web development with Rust, to be clear. That's part of the whole "expanding what you can do" bit.

> randomly from the norm for no apparent reason other than to be different

This has been written about in a number of places, and I don't have time to get into it, but a lot of languages are trending in this direction with syntax because it is more regular in a language that contains pervasive type inference. It's not random.

> Static checking etc. is nice but what's wrong with things like typescript?

Typescript still has node (or deno, still V8) as a runtime, so you're still dealing with its runtime, and all the cons (and pros) there. Additionally, the guarantees you get out of TS and Rust are different, as they have pretty different type systems, even if they're both statically typed, and TS is closer to Rust than it is to JS.

Re:Single Page Applications using Rust by woah on Tuesday August 11, 2020 @05:16PM (#24126075)
A dislike of the function keyword used in a language seems like an incredibly strange and arbitrary way to make a decision about it