Fun experiment idea: standalone, synchronous acorn-based scope hoisting module. Reusable by all JS compilers 
-
-
-
Replying to @bcomnes @uhhyeahbret
If you check out browserify it adds require semantics to the module. Takes a while to walk all statements - hoisting to same scope is faster
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @uhhyeahbret
There are like compilers that center themselves completely around this optimization. I'd love to have it just as a transform (:
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @uhhyeahbret
keen! once upon a time i started with https://github.com/ahdinosaur/es-modulesify …, but i got bored with having no real-world reason for these optimizations.
1 reply 0 retweets 0 likes -
then i was going to try https://github.com/nolanlawson/rollupify … and https://github.com/rollup/rollup-plugin-commonjs …, so i could re-use existing code, but did other things instead.
1 reply 0 retweets 0 likes -
is this inspired by the fancy new webpack release? maybe something useful in dev log on "scope hoisting": https://medium.com/webpack/webpack-freelancing-log-book-week-5-7-4764be3266f5 …
1 reply 0 retweets 1 like
Yeah, lil bit - both webpack and rollup now have it and sing the gospel - figured it'd make for a good standalone module / experiment
-
-
Like you say, not sure about the real world value - but fun to hack around with I reckon
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.