Skip to content

JavaScript is amazing trash. Rust too.

#webdev #javascript #rust #typescript #webassembly #coding

JavaScript is amazing trash. Rust too. Let me explain.

JavaScript and TypeScript are amazing

JavaScript runs everywhere, it is easy to learn and you can do anything with it.

TypeScript just makes it even better. You get powerfull typing and when it gets too complicated, you can just opt out for a piece of code.

If you don't like one code style, you can just pick a framework you like and use it. There are so many options and thus you can always find something that fits your needs.

JavaScript and TypeScript are trash

JavaScript has many weird behaviours:

TypeScript is unmaintainable. The typechecker is just one huge js file. It is slow and you can't really do anything about it.

JavaScript is fast enough for most things, but you can't really do anything about it. Just-in-time compilation exists but is not very reliable.

Rust is amazing

Rust is fast, safe and modern. You can do a lot of things with it and you have low-level control from a high-level language.

It has a powerfull type system and a superior alternative to garbage collection: Ownership.

Enums are perfect for expressing states and for doing error handling. Especially in combination with pattern matching. You can build super cool state machines with it.

It is also possible to ship rust code to the browser with WebAssembly.

When something is wrong the compiler will tell you exactly what is wrong and why it is wrong. It will also give you suggestions on how to fix it. It's the best compiler I have ever seen.

Rust's approach to error handling and None and polymorphism is amazing. It is so much better than in other languages.

Rust is trash

Rust is not easy to learn. It is a quite complex language and you have to learn a lot of things before you can write real applications.

The compiler is not the fastest (I think it just a thing with compilers) and cargo builds dependencies from source which takes a lot of time.

Conclusion

JavaScript is amazing trash. Rust too. I love both of them and I think they are both great languages. I think they are both worth learning and using, but rust will be the future.

Thanks for reading! If you have any questions or comments, comment below. I'd love to hear from you! You may also fix errors or suggest changes in the GitHub repo.

Jak2k