4 ms·
That's a nice ideal, but esbuild has managed to reduce build times 100x by building JS tooling in Go. Given how widely used JS it, the amount of time that would
by nicoburns 5y ago
That's a nice ideal, but esbuild has managed to reduce build times 100x by building JS tooling in Go. Given how widely used JS it, the amount of time that would be saved by faster tools in this area is humungous.
- dmix 5y agoesbuild is also basically becoming the new standard, taking the crown from Webpack.
- hunterb123 5y agoESbuild currently replaces Babel in most workflows. Webpack is still used as the bundler. My current gripe is the lack of Babel macros support in ESbuild. I need them for translations. Afaik ESbuild does not have macros.
- christophilus 5y agoI jumped from C# to Ruby to JS/TS to Go easily. Rust has taken a lot longer to learn. Today, if I need a statically compiled binary, I use Go, simply because I can crank out a solution quickly. My point is that Go seems like a reasonable choice, if you want to easily onboard developers who are familiar with JavaScript. I don't think Rust would be as accessible.
- Zababa 5y agoI personally find Rust easier than Go. The compiler helps more, rust-analyzer is way better than the Go language server, the Rust docs are great, package management is better, and the richer type system means that it's usually easier for me to "glue the types" in my head to know what I need to do. Of course that's not universal, some people will find Go easier, some will find something else easier. But my point is just that some people will find Rust accessible.
- nicoburns 5y agoI wonder if perhaps your OOP background is holding you back with regards to Rust. I see this quite a lot in /r/rust. People from a c#/Java background struggling. I personally learnt Rust quite quickly and easily coming from a JS background. There was some new stuff to learn, but the Book covered that well, and what I consider idiomatic JS - lot's of functional iterator chains, minimal mutation, duck typing, etc - translated into Rust pretty much 1:1. Cargo is also familiar to the JS dev, and the availability of high quality libraries means that a beginner Rust dev doesn't need to learn the most complex parts until later.
- christophilus 5y agoI learned OCaml, Erlang, and Clojure easily enough. I generally prefer a functional style, so i don’t think that’s it. Haskell and Rust are the two most difficult languages I’ve learned. That said, Rust has come a long way in terms of ergonomics.
- deleted 5y ago[deleted]
- lhorie 5y agoesbuild is the current darling leading the pack, but there are also various other projects in the space (swc[0] is written in Rust, fjb[1] is written in C, bun[2] is written in zig, leveraging JavascriptCore's engine). The most significant performance-oriented effort in this space still leveraging JS that I know of is kataw[3], and while that's quite fast compared to babel, it's still within an order of magnitude from babel. Kataw itself is a CST-based implementation that was created to outperform seafox (a AST-based parser by the same developer), which itself is an iteration over several other perf-oriented parser projects. Babel gained popularity due to the crazy amount of churn in grammar over the past few years, but more and more I think the dust is settling, and flexibility is no longer the name of the game, making an AST-based implementation less appealing. The Rome team must be feeling the heat if the data structure design choices are being informed by performance. I highly doubt someone will be able to compete in performance using a JS implementation in today's landscape. [0] https://github.com/swc-project/swc https://github.com/swc-project/swc [1] https://github.com/sebbekarlsson/fjb https://github.com/sebbekarlsson/fjb [2] https://bun.sh/ https://bun.sh/ [3] https://github.com/kataw/kataw https://github.com/kataw/kataw
- yewenjie 5y agoIs there a benchmark and comparison of these new tools somewhere?
- kuberlog 5y agoThere is a big difference between writing in Go vs Rust. Any intermediate/advanced webdev will feel competent in Go in a matter of days. This is definitely not true with rust.