[HN Gopher] Bun: A Complete Overhaul of the JavaScript Ecosystem
       ___________________________________________________________________
        
       Bun: A Complete Overhaul of the JavaScript Ecosystem
        
       Author : freeqaz
       Score  : 8 points
       Date   : 2022-07-26 20:28 UTC (2 hours ago)
        
 (HTM) web link (www.lunasec.io)
 (TXT) w3m dump (www.lunasec.io)
        
       | freeqaz wrote:
       | My colleague was super excited about Bun and wrote this post
       | based on his gripes with the JavaScript ecosystem + why he's
       | excited for Bun to disrupt the current web tool chain. I figure
       | maybe there are a few Node.js haters on HN (just a hunch) that
       | share that enthusiasm. :P
       | 
       | There was another thread about Bun on HN a few weeks ago when it
       | launched and that's where we first became aware of it:
       | https://news.ycombinator.com/item?id=31993429
        
         | verdverm wrote:
         | nice article, I agree Deno is probably not going to win,
         | especially after watching this pretentious talk [0]. I
         | personally expect WASM based solutions to take market share
         | from JS/TS by enabling any language to be used. Still a bit out
         | in time I suspect, but the interest is definitely there on the
         | user end.
         | 
         | [0] https://www.youtube.com/watch?v=3NR9Spj0DmQ
        
           | Ramiro wrote:
           | I agree is early, but the same thought around WASM crossed my
           | mind. Interesting approach though
        
           | freeqaz wrote:
           | Is it pretentious because he said he wrote the talk the night
           | before? (It is Ryan Dahl giving the talk and he's pretty
           | famous for writing Node.js originally.)
           | 
           | It's interesting the goals that he outlines at 3:30. They
           | feel like the same goals as what Bun has for the project.
           | I'll paste them below (thank you iOS image OCR)
           | 
           | > My Dream Stack
           | 
           | > - Reduces boilerplate > - ideally very small apps can be
           | defined in a single file
           | 
           | > - Uses JavaScript, the universal scripting language
           | 
           | > - Async I/0 and optimal HTTP server performance
           | 
           | > - Built-in, uniform dev tools - code formatter, linter, doc
           | generation, etc
           | 
           | None of those describe the goal of what my understanding of
           | Dyno has previously led me to believe: Security around 3rd
           | party dependencies. (They've forked the entire NPM ecosystem
           | to make this possible, and this is the key differentiator
           | between Bun and Dyno in my mind.)
        
       | lioeters wrote:
       | > I'm not sure if Bun is also a complete rewrite of the
       | TypeScript compiler, but it appears to be.
       | 
       | I thought it used ESBuild for that part.
       | 
       | Looking in Bun's Git repo, I see under Credits:
       | 
       | > While written in Zig instead of Go, bun's JS transpiler, CSS
       | lexer, and node module resolver source code is based on @evanw's
       | esbuild project.
       | 
       | https://github.com/oven-sh/bun#credits
       | 
       | Reading it this time, I understand ESBuild was only used as a
       | reference, and Bun's transpiler is indeed a fresh rewrite.
       | 
       | Same as ESBuild, it does no typechecking.
       | 
       | > Bun doesn't actually typecheck the TypeScript code. It only
       | transpiles it to javascript. Typechecking should be handled
       | either by your IDE or other tools like tsc.
        
       ___________________________________________________________________
       (page generated 2022-07-26 23:02 UTC)