9/23/2023 0 Comments Babel meaningNext.js also lists other reasons such as extensibility, support for WASM (WebAssembly) and the amazing Rust community and ecosystem for the switch from Babel. The speed alone would make SWC a no-brainer to switch to. SWC is 20x faster than Babel on a single thread and 70x faster on four cores. SWC is fabulously, unbelievably, irresistibly fast. Rust is also proven to be versatile and powerful as a developer tool, as evidenced by the rise of SWC (Speedy Web Compiler), which has been quickly adopted by Next.js, which in turn replaces Babel as the compiler. Rust's secret? More efficient, performant and memory safe. After that, Rust has been proven to be irresistible to all major companies such as Google, Amazon, Facebook, Microsoft. In 2014, it had its first stable release. In 2006, a new programming language called Rust was born out of a personal project. However, the wheels of technologies are always moving. Traversal and Transformation: A traverser Babel-Traverse traverses through the AST to analyse and transform the AST as neededīabel generator outputs the final code from the transformed AST.įor more detailed and excellent explanation, please check out this articleīabel has had its heyday and is still basking in its nearly ubiquitous glory.How fitting that Babel has a Babylon) reads the code and converts it to an Abstract Syntax Tree (AST) Shall we look a little deeper into the Babel process?įor Babel, the code-to-code translation/compilation happens in three stages, each undertaken by a different tool. Babel also makes uses a polyfill library called core-js, which in turn uses a JavaScript parser, acorn. For example, if you search for Optional chaining operator, you will get the following Christmas-ish color coded table:īabel has been and is still widely used and is an essential tool in web development.ġ,492,293 live websites using Babel and an additional 4,816,551 sites that used Babel historically and 622,292 websites in the United States.īehind Babel is the creator Sebastian McKenzie and the team now consists a small number of contributors. You can always search to see who supports what. While the language of JavaScript continues to evolves, version by version, in leaps and bounds, Babel makes sure smooth translations of modern features such as ES6, React JSX extensions and so on can continue to function on older devices. In another word, Babel has been the bridge that allows developers to explore newer and better things without worrying about breaking applications on older / slower-to-catch-up browsers. The compiled code runs in any environment. So what does Babel do? Or what does any compiler / transpiler do?īabel transpiles modern, newer versions of JavaScript such as ES6 or TypeScript into old fashioned JavaScript understandable by older browsers.įor example, The following code uses optional chaining operator and object destructure we have been taking for granted:Įnter fullscreen mode Exit fullscreen mode And for a long time, it is the only compiler (to me anyway). To JavaScript developers, Babel means one thing only: a JavaScript compiler or transpiler (a tool that translates and compiles). Same as babble, it imitates the manner a person rambles in confusion, which is what I might be doing throughout my following attempt to grasp Babel, then Rust, then SWC. The word is also onomatopoeic (a word that sounds similar to the noise the word refers to). The word Bab-El literally means Gate of Heaven (Bab: Gate El: Heaven). The millennia-old-story goes that the people of Babylon wanted to construct a tower to heaven, which infuriated God, who in turn dispersed people across different lands and made them speak different languages so they cannot understand and communicate with each other. This word is loaded, full of culture and history, involving human and God. Image Source: Language Is Baffling - The Story of the Tower of Babel
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |